You are here: Re: [PHP] Arrays « PHP « IT news, forums, messages
Re: [PHP] Arrays

Posted by olivier on 07/12/05 14:50

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, virtualsoftware@gmail.com 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 !!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация