function removeWhiteSpace($str) {
return preg_replace('/\s+/', '', $str);
}
// Example usage:
$string = " Hello World ";
echo "String without white spaces: " . removeWhiteSpace($string);
Subscribe
Login
0 Comments