php array move first element to last

Solutions on MaxInterview for php array move first element to last 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 array move first element to last"
Greta
04 May 2019
1$array = array("PHP", "JS", "JAVA");
2$first_element = array_shift($array);
3$array[count($array) + 1] = $first_element;
4print_r($array);