Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php rearrange array

function rearrange_array($array, $key) {
    while ($key > 0) {
        $temp = array_shift($array);
        $array[] = $temp;
        $key--;
    }
    return $array;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #rearrange #array
ADD COMMENT
Topic
Name
8+6 =