Re: Re: unset empty elements in an array
| From: | Justin French | Date: | Mon, 12 Jul 2004 15:57:48 +0000 |
| Subject: | Re: Re: unset empty elements in an array | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-190253@lists.php.net to get a copy of this message | ||
On 12/07/2004, at 6:38 PM, Thomas Seifert wrote:
Really what do you need an internal function for something simple like that?It may be simple, but it's 60 characters I have to type over and over, or a user defined function I have to include() from a library file (and I have to ensure that library file is up to date on 30+ web applications). My view of internal functions is that they solve common, repetitive problems. Sure, some of those problems are quite complex, but others are not. A perfect example would be array_walk() -- it can be solved in a "one liner" too: foreach ($in as $k => $v ) { $in[$k] = myFunction($v); } ... but someone decided it was useful as an internal function. My hope was that there was such a function to delete empty array elements already defined in PHP, but since it appears there isn't, I'll just keep including my own from a library file. --- Justin French http://indent.com.au