-1
<?php
$cars = array
(
array("Volvo",22,18),
array("BMW",15,13),
array("Saab",5,2),
array("Land Rover",17,15)
);
echo $cars[0][0].": In stock: ".$cars[0][1].", sold: ".$cars[0][2].".<br>";
echo $cars[1][0].": In stock: ".$cars[1][1].", sold: ".$cars[1][2].".<br>";
echo $cars[2][0].": In stock: ".$cars[2][1].", sold: ".$cars[2][2].".<br>";
echo $cars[3][0].": In stock: ".$cars[3][1].", sold: ".$cars[3][2].".<br>";
?>
而且我試試我的方法,但沒有工作的任何想法?方法:
$info = array
(
while($row = mysqli_fetch_array($retval, MYSQL_ASSOC))
{
array($row["id"],$row["name"],$row["mname"],$row["sdate"],$row["fdate"],$row["bphoto"],$row["sphoto"],
$row["text"],$row["one"],$row["two"],$row["three"],$row["four"],$row["five"],$row["six"],$row["seven"],
$row["eight"],$row["nine"],$row["imdb"],$row["sztrailer"],$row["etrailer"]),
}
);
查詢:
document.getElementById("alcim").innerHTML = "(" + ' . $info[$_GET["list"]][2] . ' + " " + ' . $info[$_GET["list"]][3] . ' + "-" + ' . $info[$_GET["list"]][4] . ' + ")";
任何想法? 如何編輯php的矩陣值使用mysql?
謝謝,我仍然使用它 - > $ info [$ row] [「id」] = $ row [「id」];這是在一個while循環? –