howto remove key/value from array based on regexp
| From: | Dan Larsson | Date: | Tue, 11 Apr 2000 15:00:48 +0000 |
| Subject: | howto remove key/value from array based on regexp | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-13380@lists.php.net to get a copy of this message | ||
My aim is to remove any keys where the values contain nothing but
spaces and/or newlines from an array.
$array[0] = '123';
$array[1] = ' ';
$array[2] = 'abc';
so that the above array becomes
$array[0] = '123';
$array[1] = 'abc';
Any ideas?
Regards
------------
Dan Larsson