- This topic is empty.
April 23, 2015 at 9:19 am #200983bearheadParticipant
I have a script that inserts all images from the specified file into a slideshow, and I’m using
exif_read_datato get the copyright information, and then echo that out on the page.
My script is setup like so:
foreach (glob("FILE") as $imgname)
echo '<li><img src="/' . $imgname . '" />
<span class="slide_credits">' . $exif = exif_read_data($imgname); echo $exif['Copyright'] . '</span></li>';
It works, but instead of echoing out “copyright blah” it echos “Arraycopyright blah”
Why is the “Array” in there? I understand that exif_read_data returns an array, but aren’t I echoing out just one value with
echo $exif['Copyright']? I’ve echoed array values like that before with no issue, but I can’t figure out what is different this time.
I was being foolish, I was trying to get the exif data and echo it within an echo…
problem solved!April 23, 2015 at 4:36 pm #201006shaneismeParticipant
This reply has been reported for inappropriate content.
I was about to reply with that until I saw your edit :P
- You must be logged in to reply to this topic.