Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php array move first element to last

$array = array("PHP", "JS", "JAVA");
$first_element = array_shift($array);
$array[count($array) + 1] = $first_element;
print_r($array);
 
PREVIOUS NEXT
Tagged: #php #array #move #element
ADD COMMENT
Topic
Name
9+4 =