Answers for "array php from string trim"

PHP
0

trim elements of array php

$arr = array( " John ", "Jacob ", " Tom ", " Tim ");
$result = array_map('trim', $arr)
Posted by: Guest on June-13-2020
3

how to trim text php

$text = "      hello world   ";
$text = trim($text);

=> "hello world"
Posted by: Guest on September-28-2020

Browse Popular Code Answers by Language