Hello I'm learning php but I'm hard stuck on what the next step should be. I have a multidimensional array:
$fruits=array(
array(
"name"=>"The Banana",
"color"=> "Yellow",
"information"=>"bananas have lots of fiber."),
array(
"name"=>"The Strawberry",
"color"=> "Red",
"information"=>"strawberries have lots of vitamin."),
;
I'm able to show the array with my for each function
function show_fruits($fruits){
foreach($fruits as $fruit)
echo $fruit[name]."<br>".$fruit[color];
}
But now I want to pass the information into a new single page where it also shows the "information" key depending on the selection.
I was trying to use $_GET and embed the URL into my function but I was only getting "the" in the url result.
If anyone have better idea or how to proceed I would greatly appreciated!