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
Post a Comment