How to use trim in PHP
In this article I will explain how trim function can be used in PHP.
This function removes spaces and other predefined characters from both sides of a string.
$str = " Hello Swati! ";
echo "Without trim: " . $str;
echo "<br />";
echo "With trim: " . trim($str);
You may also want to read these related articles Click here
Ask Your Question
Got a programming related question? You may want to post your question here
Programming Answers here