Answers for "how to trim space in php"

PHP
2

how to trim white space array in php

$fruit = array('  apple ','banana   ', ' , ',     '            cranberry ');
$trimmed_array = array_map('trim', $fruit);
print_r($trimmed_array);
Posted by: Guest on April-28-2020
0

remove space from start and end of string in php

$trimmed = trim($text);
var_dump($trimmed);
Posted by: Guest on September-22-2020

Browse Popular Code Answers by Language