1.

How to get elements in reverse order of an array in php?

Answer»

For this we can use array_reverse() function.

Example

$array = array("1"=>"BEST","2"=>"Interview","3"=>"Question");
print_r(array_reverse($array));

// OUTPUT Array ( [3] => Question [2] => Interview[1] => Best)



Discussion

No Comment Found