Remove the first element of an array – PHP

<?php
 $sampleDate = array("Test1", "Test2", "Test3", "Test4");
 array_shift($sampleDate);
 print_r($sampleDate); // Array ( [0] => Test2 [1] => Test3 [2] => Test4 ) .
 // Test1 will be shifted
?>
Share

Leave a Reply

Your email address will not be published. Required fields are marked *