Answers for "php move element to beginning of array"

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 element to beginning of array"

Browse Popular Code Answers by Language