求教下数组输出的问题
本帖最后由 redirggg 于 2013-07-04 11:55:04 编辑
Array
(
[IsSuccesfull] => 1
[Results] => Array
(
[SingleResul] => Array
(
[0] => Array
(
[QueryId] => 100093
[PathId] => 1
[SourceFolder] => 1111111
)
[1] => Array
(
[QueryId] => 100093
[PathId] => 2
[SourceFolder] => 1111
)
)
)
)
分享到:
[解决办法]
假设 $t 是你的数组
$ar=array();
foreach($t['Results']['SingleResul'] as $v){
if(!isset($ar[$v['QueryId']])){
$ar[$v['QueryId']]=$v;
}
}
foreach($ar as $v) echo join('
[解决办法]
' , $v)."<br>";