Hi,
I'm struggling to get my head around this problem. All help, as usual greatly appreciated.
I want the array to look like this:
$gallery = array(
0 => array("location" => "images/001.jpg", "title" => "Image Title 1", "description" => "Image description number one"),
1 => array("location" => "images/002.jpg", "title" => "Image Title 2", "description" => "Image description number two")
);
This successfully allows me to use a foreach statement to blast through the images in the array:
foreach ($gallery as $image)
printf ("Title: %s Description: %s<br />", $image[title],$image[description]);
}
This seems to be working fine when the array is filled in manually.
However the problem comes when I try to load the array using information from a database.
I can't seem to figure out the correct syntax to populate a multidimensional array from a MySQL database.
Any ideas??
All help appreciated.