我对下面的以下代码有疑问。
if ($cursor->count() > 0)
{
$test = array();
// iterate through the results
while( $cursor->hasNext() ) {
$test[] = ($cursor->getNext());
}
//print_r($test);
foreach($test as $d) {
print_r($d);
$current_name = $d[0]['personal']['name'];
}
}
但是当我在我的 mongodb 中时
array("personal"=>array("name"=>"rusty"));