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

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 }