Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. function trim_r($array) {
  2. if (!is_array($array))
  3. return trim((string) $array);
  4. foreach ($array as $key => $value) {
  5. if ( is_array($value) )
  6. $array[$key] = trim_r($value);
  7. else
  8. $array[$key] = trim((string) $value);
  9. }
  10. return $array;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement