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, ∼3272🔥, 0💬
Popular Posts:
How To Open Standard Output as a File Handle in PHP? If you want to open the standard output as a fi...
How to use "link" command tool to link objet files? If you have object files previously compiled by ...
How To Read Data from Keyboard (Standard Input) in PHP? If you want to read data from the standard i...
Where to find tutorials on Using Azure API Management Developer Portal? Here is a list of tutorials ...
Where to find tutorials on RSS specifications? I want to learn it to describe my API services. Here ...