开发者

php array. cant get the output i desire. help me

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);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜