RE: [PHP] Easier way to delete all entries in an array?
| From: | Monu Ogbe | Date: | Thu, 12 Jun 2003 15:37:59 +0000 |
| Subject: | RE: [PHP] Easier way to delete all entries in an array? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-151263@lists.php.net to get a copy of this message | ||
Or perhaps,
$the_array = array();
Monu
-----Original Message-----
From: Wendell Brown [mailto:wbrown@arkie.net]
Sent: 12 June 2003 16:31
To: James E Hicks III; php-general@lists.php.net
Subject: Re: [PHP] Easier way to delete all entries in an array?
On Thu, 12 Jun 2003 10:13:10 -0400, James E Hicks III wrote:
>There's got to be an easier way, is there?
>
>for ($i=0; $i < count($the_array); $i++){
> array_pop($the_array);
>}
Maybe this:
unset( $the_array );
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php