Answers for "php move array element to beginning"

PHP
0

php move element to beginning of array

$array = array("JS", "JAVA");
array_unshift($array, "PHP");
print_r($array);
// Add More Than One Element
$array1 = array("JS", "JAVA");
array_unshift($array1, "PHP", "CSS", "HTML");
print_r($array1); // => { PHP CSS HTML JS JAVA }
Posted by: Guest on June-09-2021

Code answers related to "php move array element to beginning"

Browse Popular Code Answers by Language