Hi,

I have a script in which I run through about 2000 directories on my site to check how many files exist in each directory.

Problem is, when the array is finished printing for me and it starts to loop into the next directory, the number does not get cleared, it just adds to the number of the last array.

Make sense?

How would I CLEAR the array elements at the bottom of the loop to start fresh when it loops through again?

Any help is appreciated.

Thanks.

    Hi Brian,

    I think you are looking for the function

    $arr = array_slice($arr, 0, 0);

    Grisu

      Write a Reply...