我试图弄清楚我是否能够在数组内进行 while 循环
while($row = $retail -> fetch(PDO::FETCH_ASSOC)){
$json['data'][] = array(
'id'=>$row['idretailers'],
"category"=>$row['category'],
"headline"=>$row['headline'],
'price'=> array ("full_price" => $row['price']),
'description'=>$row['description'],
"comments" => array(
while($row_c = $comments -> fetch(PDO::FETCH_ASSOC)){
// more items
})
);
}
评论中有一个while循环,这可能吗?
谢谢!