Note Submitter: ethan dot nelson at ltd dot org
Reason: useless
----
This does the same thing as some of the posts below (minus
the keys), but I thought I'd share anyway cause it is
slightly more elegant. Also, its a good example using
references such that this could be used as a callback
function.
function utf_prepare(&$array) {
foreach($array AS $key => &$value) {
if (is_array($value)) {
$this->utf_prepare($value);
} else {
$value = utf8_encode($value);
}
}
}
--
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php
|