canadabeeau Posted March 14, 2010 Share Posted March 14, 2010 Hi I am running this code $images = $array['images']; $images = explode(";", $images); for ($i = 0, $len = strlen($images); $i < $len; $i++) { $images_exploded = explode("|", $images{$i}); $title = $images_exploded[0]; $description = $images_exploded[1]; $image = $images_exploded[2]; echo '<li>'; echo '<h3>'.$title.'</h3>'; echo '<span>http://'.$_SERVER['HTTP_HOST'].'/img/'.$image.'</span>'; echo '<p>'.$description.'</p>'; echo '<a href="#"><img src="http://'.$_SERVER['HTTP_HOST'].'/img/'.$image.'" height="75px" /></a>'; echo '</li>'; } Problem is it is only doing the first images data before ; even though I have 2 setup it will only run the first All help appreciated Link to comment https://forums.phpfreaks.com/topic/195186-foreach/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.