I am having incorrect output on the sample code from beginner's books. This is the code...
Code: Select all
<html>
<head></head>
<body>
<ul>
<?php
$footballTeam = array('Chiefs', 'Bengals', 'Redskins', 'Chargers');
foreach ($footballTeam as $item)
{
echo "<li>One football team's name is $item";
}
?>
</ul>
</body>
</html>
One football team's name is $item"; } ?>
Instead of going through the values in the array. I am having this problem with my output pretty much anytime I have php inside of an HTML file...
Thanks for any help you can give.