Skip to main content


  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #200983

    I have a script that inserts all images from the specified file into a slideshow, and I’m using exif_read_data to 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!


    This reply has been reported for inappropriate content.

    I was about to reply with that until I saw your edit :P

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.