php remove all whitespace from a string
snippet in php

php remove all whitespace from a string

user6750

//remove all white spaces from a string
$whatonearth=preg_replace('/\s/','',"what o n   ear th");