こんにちは、私はこれを機能させることができないようで、8行目と11行目で未定義のエラーが発生し続けます.これが私のコードです
<?php
$count = 0;
$temp = 0;
$name = array("Suzuki", "Holden", "Jaguar", "Toyota", "Hyundai", "Ford", "Honda", "Mazda");
echo $name[0] . " " . $name[1] . " " . $name[2] . " " . $name[3] . " " . $name[4] . " " . $name[5] . " " . $name[6] . " " . $name[7] . "<p>";
for ($incount = 0; $incount <= 7; $incount++) {
if ($name[$incount] > $name[$incount + 1]) {
$temp = $name[$incount];
$name[$incount] = $name[$incount + 1];
$name[$incount + 1] = $temp;
echo $name[0] . " " . $name[1] . " " . $name[2] . " " . $name[3] . " " . $name[4] . " " . $name[5] . " " . $name[6] . " " . $name[7] . $count++ . "<p>";
}
}
?>