Hello,

You may try unset($product) in your loop if you want to delete this var.
Your code $product=array(); must work too...
Another way, must be to use something like this $product["id"]=$product_id;

But i dont think it's your real goal?!
Could you give some more information about that?

Olivier

Ps: documentation for unset :
http://www.php.net/manual/en/function.unset.php

Le Mardi 12 Juillet 2005 13:34, [EMAIL PROTECTED] a écrit :
> Hi,
>
> How can i destroy an array?
> I mean i have a loop and for each new value in the loop i want to destroy
> the array. Something like that:
>
>  while($row = mysql_fetch_array($result))
>       {
>
>           $product[] = $product_id;
>
>          // some code here
>
>      }
>
> I've tried this but doesn't work
>
>  while($row = mysql_fetch_array($result))
>       {
>
>           $product = array();
>
>           $product[] = $product_id;
>
>          // some code here
>
>      }
>
> Any help would be appreciated !!

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

Reply via email to