php move element to beginning of array

Solutions on MaxInterview for php move element to beginning of 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
  
showing results for - "php move element to beginning of array"
Giada
29 May 2017
1$array = array("JS", "JAVA");
2array_unshift($array, "PHP");
3print_r($array);
4// Add More Than One Element
5$array1 = array("JS", "JAVA");
6array_unshift($array1, "PHP", "CSS", "HTML");
7print_r($array1); // => { PHP CSS HTML JS JAVA }