"Dale Hersh" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I have a question regarding the count function. Here goes:
>
> Lets pretend I have this array called myStuff. If I add two elements to
> myStuff and call the count function, I will get a result of 2. My question
> is how do I re-initialize the array after adding elements so when I call
the
> count function on the array, I get a result of 0.
>
> Thanks,
> Dale

I assume you want to KEEP the other values in the array?  If not then you
can just unset($myStuff).

If you do want to keep the array intact then I suppose you could store the
count in a variable $counta, add more elements to the array (or not), take
the count again and store it in a new variable $countb, then subtract the
values $count = abs($counta - $countb);

abs() converts to the absolute value if the result is negative.

- Kevin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to