@vaultdweller123
It work! I think I was overthink about the array.
$cake can echo Blueberry Cheesecake
$cheesecake can also echo Blueberry Cheesecake.
I guess either array can echo Blueberry Cheesecake!
I figure out how you came up with the number!
It's from here:
<pre>
<?php
$cheesecake = array("Apple Cheesecake", "Blueberry Cheesecake", "Strawberry Cheesecake", "Mango Cheesecake", "Raspberry Cheesecake");
$cake = array("Apple Cheesecake", "Blueberry Cheesecake", "Strawberry Cheesecake", "Mango Cheesecake", "Raspberry Cheesecake");
print_r($cheesecake);
print_r($cake);
?>
</pre>
When I print_r($cheesecake); or print_r($cake);
This came out:
Array
(
[0] => Apple Cheesecake
[1] => Blueberry Cheesecake
[2] => Strawberry Cheesecake
[3] => Mango Cheesecake
[4] => Raspberry Cheesecake
)
So when I echo either example:
<?php
$cake = array("Apple Cheesecake", "Blueberry Cheesecake", "Strawberry Cheesecake", "Mango Cheesecake", "Raspberry Cheesecake");
echo "I am going to eat a ".$cake[1]. "<br />";
?>
-
<?php
$cheesecake = array("Apple Cheesecake", "Blueberry Cheesecake", "Strawberry Cheesecake", "Mango Cheesecake", "Raspberry Cheesecake");
echo "I am going to eat a ".$cheeesecake[1]. "<br />";
?>
It will echo I am going to eat an Blueberry Cheesecake
Thanks for being patience and helping me out with this issue. Thanks!