trim pgp code example
Example 1: remove whitespace from string php
$str = "\n\n\nHello World!\n\n\n";
echo "With trim: " . trim($str);
Example 2: how to trim text php
$text = " hello world ";
$text = trim($text);
=> "hello world"
$str = "\n\n\nHello World!\n\n\n";
echo "With trim: " . trim($str);
$text = " hello world ";
$text = trim($text);
=> "hello world"