0
I don’t know why that parse error in my foreach
. Follows the code :
<?php
if (isset($_GET["submit"])){
}
$form =
foreach ($_GET["cimc"] as $form) {
$peso == $_GET['peso'];
$altura == $_GET['altura'];
if (isset($peso)) {
$imc = ($peso /( $altura * $altura));
}
}
?>
Greetings, earthling. What would that be
$form =
lost in your code?– Woss
greetings, that $form = in case it was unintentionally, already removed and continues the same error
– theel
Please do the [tour] and read the [Ask] guide. Search the [Edit] question and add exactly what the error message is. Except you have used
==
for attribution rather than=
, I couldn’t reproduce the "parser error" you quoted.– Woss
Parse error: syntax error, Unexpected 'foreach' (T_FOREACH) in /var/www/html/main/library/imc.php on line 31 would be the error
– theel
That would give with the
$form
there. If you got out, there’s no reason to make the mistake yet.– Woss
Notice: Undefined index: cimc in /var/www/html/main/biblioteca/imc.php on line 31 Warning: Invalid argument supplied for foreach() in /var/www/html/main/biblioteca/imc.php on line 31 ?>
– theel