I would like to create something simple. Since I\'m new to PHP, I\'m struggling to see what I\'m doing wrong,. I have two PHP files content in code snippets below, as well a
your code
foreach ($toppingItems as $item) {
echo "";
}
contains an error:
You cannot use unescaped double quotes within a double quoted PHP string.
Try:
As you can see I've used to set my control structure, yet I've place my HTML outside of the php open and closing tag. Also I've used
= $item[number] =>
as short for
This is a matter of preference, I find it makes the code more readable.