Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
sort() - Sort array in ascending alphabetical order
SUBMITTED BY:
henry1874w
DATE:
June 17, 2017, 1:10 p.m.
FORMAT:
Text only
SIZE:
226 Bytes
Raw
Download
Tweet
HITS:
301
Go to comments
Report
<!DOCTYPE html>
<html>
<body>
<?php
$cars = array("Volvo", "BMW", "Toyota");
sort($cars);
$clength = count($cars);
for($x = 0; $x < $clength; $x++) {
echo $cars[$x];
echo "<br>";
}
?>
</body>
</html>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus