Tools, FAQ, Tutorials:
Removing Leading and Trailing Spaces in PHP
How To Remove Leading and Trailing Spaces from User Input Values?
✍: FYIcenter.com
If you are taking input values from users with a Web form, users may enter extra spaces at the beginning and/or the end of the input values. You should always use the trim() function to remove those extra spaces as shown in this PHP script:
<?php $name = $_REQUEST("name"); $name = trim($name); # $name is ready to be used... ?>
⇐ Remove Trailing New Line Character in PHP
2016-10-13, 2398🔥, 0💬
Popular Posts:
How To Pad an Array with the Same Value Multiple Times in PHP? If you want to add the same value mul...
How To Set session.gc_divisor Properly in PHP? As you know that session.gc_divisor is the frequency ...
How To Convert a Character to an ASCII Value? If you want to convert characters to ASCII values, you...
Where to see some Examples of Invalid JSON Values? Here are some Examples of Invalid JSON Values: 1....
How to create a navigation file like navigation.xhtml for an EPUB 3.0 book? At least one navigation ...