I tried to remove few array elements from my PHP script using PHP's unset() built-in funciton.
here is the code, that I tried.
<?php
$my_array = array('.','..','one','two','three','four');
unset($my_array[1] , $my_array[0]);
echo '<pre>';
print_r($my_array);
echo '</pre>';
?>
Then I got this output.
Array
(
    [2] => one
    [3] => two
    [4] => three
    [5] => four
)
but this is not what I'm expected. I want somthing like this.
Array
(
    [0] => one
    [1] => two
    [2] => three
    [3] => four
)
how can I achive this? thanks.



scan_dir? That's a different question.array_shift()twice