New line in PHP array -


doing print_r on array produces:

array (     [0] => dogs     [1] => cats      [2] => birds ) 

the newline between cats , birds causing problem. did following , spacing still persists: array_walk($arr,'trim');

what can done remove spacing?

array_walk returns boolean. use array_map instead:

$arr = array_map("trim", $arr); 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -