Reputation: 1
i have this code
$dir = "img/ori/";
$dir_thumbs = "img/thumbs/";
$images = array();
$d = dir($dir);
while($name = $d->read()){
$thumb = "thumb_".$name;
$images[] = array('name' => $name,'thumb_url' => $dir_thumbs.$thumb);
}
$d->close();
$o = array('images'=>$images);
i want to output $name and $thumb_url of all the images. how to do it.? help me
Upvotes: -1
Views: 114
Reputation: 6690
<?php
foreach ($images as $image) {
echo "{$image['name']} {$image['thumb_url']}";
}
?>
Upvotes: 3
Reputation: 163228
Use print_r
or var_dump
for this:
print_r($o);
//or
var_dump($o);
Upvotes: 2