reading data from an array in php (exif)

GeX

GeX

Soldato
Joined
17 Dec 2002
Posts
6,981
Location
Manchester
considering

Code:
<?php


$exif = exif_read_data('img/home_main.jpg', 0, true);
echo "test2.jpg:<br />\n";
foreach ($exif as $key => $section) {
    foreach ($section as $name => $val) {
        echo "$key.$name: $val<br />\n";
    }
}
?>

generates this output;

http://tackycheese.net/dev/v2/test.php

all i want from this is the value of comment, this line;

Code:
COMMENT.0: hello

but i just want the bit that says 'hello'.

i'm not sure how access an array using php - can anyone point me in the right direction?

edit:

shouldn't this work?

Code:
echo $exif['COMMENT']['0'];

edit: again. it does work, nevermind. bloody typo on my part!

never mind

ALL SORTED NOW!
 
Last edited:
Back
Top Bottom