[PHP] Easier way to delete all entries in an array?

2003-06-12 Thread James E Hicks III
There's got to be an easier way, is there?

for ($i=0; $i  count($the_array); $i++){
array_pop($the_array);
}

James E Hicks III
Noland Company
2700 Warwick Blvd
Newport News, VA 23607
757-928-9000 ext 435
[EMAIL PROTECTED] 

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



Re: [PHP] Easier way to delete all entries in an array?

2003-06-12 Thread Chris Hayes
At 16:13 12-6-03, you wrote:
There's got to be an easier way, is there?

for ($i=0; $i  count($the_array); $i++){
array_pop($the_array);
}
$the_array=array(); ?

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


Re: [PHP] Easier way to delete all entries in an array?

2003-06-12 Thread Wendell Brown
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



RE: [PHP] Easier way to delete all entries in an array?

2003-06-12 Thread Monu Ogbe
Or perhaps,

$the_array = array();

Monu

-Original Message-
From: Wendell Brown [mailto:[EMAIL PROTECTED]
Sent: 12 June 2003 16:31
To: James E Hicks III; [EMAIL PROTECTED]
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


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



RE: [PHP] Easier way to delete all entries in an array?

2003-06-12 Thread James E Hicks III
The following has solved my problem. Thanks to all who helped.

$the_array=array();

-Original Message-
From: Chris Hayes [mailto:[EMAIL PROTECTED]
Sent: Thursday, June 12, 2003 10:14 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Easier way to delete all entries in an array?


At 16:13 12-6-03, you wrote:
There's got to be an easier way, is there?

for ($i=0; $i  count($the_array); $i++){
 array_pop($the_array);
}
$the_array=array(); ?


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


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