Returning an array of images problem..
-
Hey guys, I’ve got a strange thing happening here. With this code..
<?php $images = get_post_meta($post->ID, 'Images', false); if ($images) { echo "<h3>Additional Images</h3>"; foreach ($images as $image) { echo "<img src=http://localhost:8888/wordpress/wp-content/uploads/$image"; } } ?>I am getting an extra <img at the end of the address like this…
<img src="http://localhost:8888/wordpress/wp-content/uploads/tiara.jpg<img"/>I have no clue where the <img on the end is coming from, does anybody have an idea why this is happening?
Also, I was intending on this code displaying all of my custom fields with the key of Images, but it’s only returning 1.
The topic ‘Returning an array of images problem..’ is closed to new replies.