从这个php中,同时循环i在数组中获取结果
$rows = array();
$result = mysqli_query($con,"call getProductVariationByID($name)");
//$row = mysqli_fetch_array($result);
while ($row = mysqli_fetch_assoc($result))
{
$rows['Product'][] = $row;
}
echo json_encode($rows, JSON_PRETTY_PRINT);
结果是最后出现了这个"null":
"post_mime_type": "",
"comment_count": "0"
}
]
}null
我敢打赌,包含此代码的函数在您的主php脚本中是echo'd。