Want to show values separately from an array by writing "Echo". Also for each "Echo" code, the values must go in descending order.
Here is the Code for Descending values:
<?php
$toplist = array(10, 15, 20, 13, 18, 21, 25);
rsort($toplist);
$length = count($toplist);
for($x = 0; $x < $length; $x++) {
echo $toplist[$x];
echo "<br>";
}
?>
And the Output appears together like this:
25
21
20
18
15
13
10
But I want all values separately in descending order by writing each "Echo" code.
For exaples:
echo $toplist[$x1];
output: 25
echo $toplist[$x2];
output: 21
echo $toplist[$x3];
output: 20
etc. etc...