我对如何获取我的数组中的所有内容感到困惑...它就像一个SQL中的表...我可以让其中一个执行以下操作:
if ($result = mysqli_query($connection, "SELECT * FROM `todoTable` WHERE 1")) {
printf("Select returned %d rows.\n", mysqli_num_rows($result));
$row = mysqli_fetch_array($result);
echo $row[0];
mysqli_free_result($result);
}
但是,当我尝试做所有这些......它失败了..
if ($result = mysqli_query($connection, "SELECT * FROM `todotable` WHERE 1")) {
printf("Select returned %d rows.\n", mysqli_num_rows($result));
// Fetch all
$row = mysqli_fetch_all($result,MYSQLI_ASSOC);
echo $row;
mysqli_free_result($result);
}
请帮助..谢谢你
答案 0 :(得分:3)
尝试使用foreach迭代数组,我通常会使用该方法得到我想要的东西。
c12 = addmatrix(matrixMultiply(a11, b12, row/2),
matrixMultiply(a12, b22, row/2), c12, row/2);