Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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 }
 
PREVIOUS NEXT
Tagged: #php #move #element #beginning #array
ADD COMMENT
Topic
Name
9+7 =