Re: emptying hte array??
| From: | Jason k Larson | Date: | Wed, 15 Jan 2003 01:58:40 +0000 |
| Subject: | Re: emptying hte array?? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-131644@lists.php.net to get a copy of this message | ||
That's not going to 'empty' the array it's going to undefine it.
Just overwrite the array with a new empty array like:
$a = array();
That keeps the variable an array variable type and is of course empty.
HTH,
Jason k Larson
Justin French wrote:
on 15/01/03 7:52 AM, Scott Fletcher (scott@abcoa.com) wrote: How to do the proper way of emptying hte array?? Example... $a[0] = "test1"; $a[1] = "test2"; $a[2] = "test3"; $a[3] = "test4";$a = ""; <-- Is this hte proper way to do it????unset($a); http://php.net/unset Justin