我写了一个多重卷曲,它输出两个不同的阵列多个cURL并输出JSON?
我正在使用curl_multi_getcontent。
for($i = 0; $i < $node_count; $i++)
{
$results = curl_multi_getcontent ($curl_arr[$i] );
$results = json_decode($results,true);
/*echo "<pre>";
print_r($results);
echo "</pre>";*/
}
这将输出两个数组。如果我想从一个数组中获取数据,我该如何调用第一个数组?或第二个数组?
有什么样的结果$ [0]或东西第一阵列
foreach($results[0] as $result){
echo $result['pagination'];
}
这并不表明JSON字符串,它只是 '阵列 { [0] => [1] => }'和孤单那些 – hellomello
没有价值,你在'$ curl_arr有什么数据数组? – dchrastil
我没有改变任何关于你的卷曲对象,所以它应该有相同的阵列,你说它在你的原始文章中打印出来。如果你包含更多的代码,这将有所帮助。 – dchrastil