here is my code:
<?php
$flavor[] = "blue raspberry";
$flavor[] = "root beer";
$flavor[] = "pineapple";
echo "My favorite flavors are:<br>";
foreach ($flavor, as $value){
echo $value "<br>\n";
}
?>
error message:
Parse error: parse error, unexpected ',' in C:\Program Files\Apache Group\Apache2\htdocs\test\sorting.php on line 6
if I change "foreach ($flavor, as $value)" to "foreach ($flavor as $value)"
I got this message:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in C:\Program Files\Apache Group\Apache2\htdocs\test\sorting.php on line 7
I learning from a book and my code is exactly what is printed in the book, but somehow I keep getting this error. What am I doing wrong here.