This is the error message:
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in (Pathname) on line 23
<ul>
<?php
$sections = array("home", "products", "about", "contact");
foreach ($sections as $row) {
echo "<li><a href=\"index.php?page=$row\"";
if ($row==$page) {
echo "class=\"selected"";
}
echo ">$row</a></li>\n"; // This is line 23
}
?>
</ul>
I use godaddy which uses PhP 5. I got this coding idea from 'The Art of Code' podcast, by Ted Forbes - Episode "Bringing CSS and PHP together"
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ',' or ';' in (Pathname) on line 23
<ul>
<?php
$sections = array("home", "products", "about", "contact");
foreach ($sections as $row) {
echo "<li><a href=\"index.php?page=$row\"";
if ($row==$page) {
echo "class=\"selected"";
}
echo ">$row</a></li>\n"; // This is line 23
}
?>
</ul>
I use godaddy which uses PhP 5. I got this coding idea from 'The Art of Code' podcast, by Ted Forbes - Episode "Bringing CSS and PHP together"