one-liner with strtolower and array_walk()?
| From: | Marten Lehmann | Date: | Wed, 29 Mar 2006 17:35:35 +0000 |
| Subject: | one-liner with strtolower and array_walk()? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-232856@lists.php.net to get a copy of this message | ||
Hello,
is it possible to write a one-liner like this:
$uppercase = array("ONE", "TWO");
array_walk($uppercase, "strtolower");
print_r($uppercase);
I don't want to do a foreach-loop on each element, putting the lowercase in a new array and returning this. Is there a nicer way?
Regards
Marten