Pages

PHP: Delete an element from an array

PHP: Delete an element from an array 


 $array = array(0 => "x", 1 => "y", 2 => "z");
    unset($array[0]);
print_r($array);

//Output: Array ( [1] => y [2] => z )

No comments:

Post a Comment

Popular Posts