Answers for "remove whitespace in pegin of string php"

PHP
1

remove whitespace from string php

$str = "\n\n\nHello World!\n\n\n";
echo "With trim: " . trim($str);
Posted by: Guest on July-10-2020
1

php remove all whitespace from a string

//remove all white spaces from a string
$whatonearth=preg_replace('/\s/','',"what o n   ear th");
Posted by: Guest on November-04-2019

Code answers related to "remove whitespace in pegin of string php"

Browse Popular Code Answers by Language