The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End remove "array" in echo

  • This topic is empty.
Viewing 1 post (of 1 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!

Viewing 1 post (of 1 total)
  • The forum ‘Back End’ is closed to new topics and replies.