php loop backwards through array

Solutions on MaxInterview for php loop backwards through array by the best coders in the world

showing results for - "php loop backwards through array"
Gaia
02 Jan 2019
1for($i = count($array) - 1; $i >= 0; $i--){
2
3}
Joaquín
12 Feb 2016
1$array = array_reverse($array);
2foreach($array as $currentElement) {}