[eluser]woony[/eluser]
Hi,
I can't seem to find how i have to do this...
i get a list of items from my db. I know the ids and the value is a url.
print_r($data['banners']) gives
Array ( [0] => stdClass Object ( [bannerID] => 1 [imageUrl] => banner_11.jpg ) [1] => stdClass Object ( [bannerID] => 2 [imageUrl] => banner_2.jpg ) [2] => stdClass Object ( [bannerID] => 3 [imageUrl] => banner_3.jpg ) [3] => stdClass Object ( [bannerID] => 4 [imageUrl] => banner_4.jpg ) [4] => stdClass Object ( [bannerID] => 5 [imageUrl] => banner_5.jpg ) )
this holds the image names of my banners on my website. Now
at position of banner 1 i would like to do something like
<img src="<?php echo $banners['1']['imageUrl']; ?>" />
but.. that doesn't work :-) how do I get specific item from the generated arrays without having to loop through the list?