I had a need tonight to convert a numeric array from 1-based to 0-based, and found that the following worked just fine due to the "side effect" of renumbering:
<?php
array_unshift( $myArray, array_shift( $myArray ));
?>
I had a need tonight to convert a numeric array from 1-based to 0-based, and found that the following worked just fine due to the "side effect" of renumbering:
<?php
array_unshift( $myArray, array_shift( $myArray ));
?>