Skip to main content

Forums

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

    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.

    edit:
    I was being foolish, I was trying to get the exif data and echo it within an echo…

    problem solved!

    #201006
    shaneisme
    Participant

    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.