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
<?php
foreach ($images as $image) {
echo "{$image['name']} {$image['thumb_url']}";
}
?>
Use print_r
or var_dump
for this:
print_r($o);
//or
var_dump($o);
精彩评论