Parse error: parse error, unexpected T_STRING, expecting ')' in /sort.php on line 7
<html>
<head>
<title>Sorting Arrays</title>
</head>
<body>
<?php
$Grades = array("Richard" => "95, "Sherwood" => "82", "Toni" => "98", "Franz" => "87", "Melissa" => "75", "Roddy" => "85");
print ("Originally, the array looks like this:<br>");
for ($n = 0; $n < count($Grades); $n++) {
$Line = each($Grades);
print ("$Line[key]'s grade is $Line[value].<br>\n");
}
arsort($Grades);
reset($Grades);
print ("<p>After sorting the array by value using asort(), the array looks like this:<br>");
for ($n = 0; $n < count($Grades); $n++){
$Line = each ($Grades);
print ("$Line[key]'s grade is $Line[value].<br>\n");
}
ksort($Grades);
reset($Reset);
print ("<p>After sorting the array by key using ksort(), the array looks like this:<br>");
for ($n = 0; $n < count($Grades); $n++) {
$Line = each ($Grades);
print ("$Line[key]'s grade is $Line[value].<br>\n");
}
?>
</body>
</html>