php array reverse index code example Example: php reverse array $array= array(1,2,3,4,5); $reversedArray = array_reverse($array); var_dump($y);