php loop backwards through array

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

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
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) {}