Answers for "array sort array reverse php"

PHP
4

php reverse array

$array= array(1,2,3,4,5);
$reversedArray = array_reverse($array);

var_dump($y);
Posted by: Guest on February-20-2020
0

php sort reverse

<?php
$fruits = array("lemon", "orange", "banana", "apple");
rsort($fruits);
foreach ($fruits as $key => $val) {
    echo "$key = $val\n";
}
?>
Posted by: Guest on July-02-2020

Browse Popular Code Answers by Language