Skip to main content

Forums

This topic contains 1 reply, has 2 voices, and was last updated by  shaneisme 4 years ago.

Viewing 1 post (of 1 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!

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.

icon-link icon-logo-star icon-search icon-star