数组([0] =>数组([数据] =>数组([0] =>数组([like_info] =>数组([like_count] => 30)[comment_info] =&gt ;数组([comment_count] => 6)[share_count] => 17 [attachment] =>数组([description] => Mitkkk kkssk [media] =>数组([0] =>数组( [src] => com.jpg& cfs = 1))[name] => euch)[permalink] => example.com/47457343655 [created_time] => 1925))))
如何从此处列出的变量中的所有列中获取值
答案 0 :(得分:0)
你可以创建一个变量向量,我的意思是一个数组:
$var = array();
然后你可以做一个双循环来获取多维数组的所有值并将它们存储在向量上,如:
for($i = 0; i< count($yourarray); i++){
if(is_array($yourarray[i])){
for($j = 0; j< count($yourarray[i]); j++) $var[] = $yourarray[i][j];
}else $var[] = $yourarray[i];
}