Answers for "php array trim value"

PHP
5

php trim all array elements

$result = array_map('trim', $source_array);
Posted by: Guest on May-31-2020
0

trim in php

<?php

$str = "\n\n\nHello World!\n\n\n";

echo "Without trim: " . $str;

echo "<br>";

echo "With trim: " . trim($str);

?>
Posted by: Guest on June-13-2021

Browse Popular Code Answers by Language