时间:2021-07-01 10:21:17 帮助过:37人阅读
$data = json_decode($json); foreach ($data->results as $result) { if(!empty($result->Uri)){ echo ''; } }
$imgs_arr = array( "jpg" , "jpeg" , "png" , "gif" );//图片的后缀 ,自己可以添加 $data = json_decode($json); foreach ($data->results as $result) { $ext = strtolower(end(explode(".",$result->Uri))); if( !empty($ext) && in_array($ext , $imgs_arr)){ echo ''; } }