Working through PHP5 & MySql Bible by Converse, Park & Morgan - Chapter 10.
[php]$message .= “
$exercise_type
”;foreach ($per_exercise_info
as $exercise_name => $calories_burned) {
$message .= “
”.
ucfirst(“$exercise_name: $calories_burned calories
$total_calories += $calories_burned;
}
}
if ($message == “” || $weight == 0) {
$message =
“
Did you enter your weight and at least one exercise?”;
}
else {
$message .=
“
Total calories burned: $total_calories
”;}
// Now lay out the page
// --------------------
$page_str = <<< EOPAGE
Workout calculator handler (Math)The workout calculator says: $message |
Getting “Parse error: syntax error, unexpected T_VARIABLE in C:\wamp\www\test(wc_handler_math.php on line 31”
Cannot fathom out why. There is an include file also which is not in the above code,
Brian