Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
rsort() - Sort array in descending numerical order
SUBMITTED BY:
henry1874w
DATE:
June 17, 2017, 1:13 p.m.
FORMAT:
Text only
SIZE:
234 Bytes
Raw
Download
Tweet
HITS:
299
Go to comments
Report
<!DOCTYPE html>
<html>
<body>
<?php
$numbers = array(4, 6, 2, 22, 11);
rsort($numbers);
$arrlength = count($numbers);
for($x = 0; $x < $arrlength; $x++) {
echo $numbers[$x];
echo "<br>";
}
?>
</body>
</html>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus