One way to do it is to spin through the original array using a for/next loop
and build a second array of only the rows you want to keep. Then, rename the
new array to the old array. ($oldArray = $newArray;)
Cal
http://www.calevans.com
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, March 23, 2001 10:01 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Array Cleansing
Maybe someone could help with this? I'm trying to remove white space values
from my array, and resequence them, so that the following:
foo[0] = "value",
foo[1] = " ",
foo[2] = "value",
foo[3] = " ",
foo[4] = "value"
after running through a piece of code would turn into
foo[0] = "value",
foo[1] = "value",
foo[2] = "value",
foo[3] = null,
foo[4] = null,
The code I wrote, and deleted out of frustration ended up with all of the
variables equal to null. Maybe someone could show me the proper way?
PKshifted
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]