Hooks & Hacks

All Updates About Hooks & Hacks

Skip to content
  • Home
  • About
Search

PHP array_filter trim is not working as callback

May 31, 2016May 31, 2016 / WordPress Mechanic / 1 Comment
PHP array_filter trim is not working as callback

Have you tried this?

$arr = array_filter($arr, 'trim');

Solution:

$arr = array_filter(array_map('trim', $arr));

PHP array_filter trim is not working as callback

Recent Posts

  • PHP array_filter trim is not working as callback

Recent Comments

PHP array_filter tri… on PHP array_filter trim is not w…

Archives

  • May 2016

Categories

  • Uncategorized

Meta

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.com

Recent Posts

  • PHP array_filter trim is not working as callback

Recent Comments

PHP array_filter tri… on PHP array_filter trim is not w…

Archives

  • May 2016

Categories

  • Uncategorized

Meta

  • Register
  • Log in
  • Entries feed
  • Comments feed
  • WordPress.com
Blog at WordPress.com.
Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use.
To find out more, including how to control cookies, see here: Cookie Policy