Get your own PHP server Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<?php
$str = " Hello World! ";
echo "Without trim: " . $str;
echo "<br>";
echo "With trim: " . trim($str);
?>
</body>
</html>
Without trim: Hello World!
With trim: Hello World!