<?php
$namen = array("Wijnand", "Joël", "Dennis", "Thomas");
sort($namen);
reset($namen);
while (list($sleutel, $waarde) = each($namen)) {
echo "namen[" . $sleutel . "] = " . $waarde . "<br>\n";
}
?>
Resultaat:
namen[0] = Dennis
namen[1] = Joël
namen[2] = Thomas
namen[3] = Wijnand
|