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, ∼3189🔥, 0💬
Popular Posts:
How to use the "set-backend-service" Policy Statement for an Azure API service operation? The "set-b...
How to use "xml-to-json" Azure API Policy Statement? The "xml-to-json" Policy Statement allows you t...
How to extend json.JSONEncoder class? I want to encode other Python data types to JSON. If you encod...
How to use "link" command tool to link objet files? If you have object files previously compiled by ...
How to use the "rewrite-uri" Policy Statement for an Azure API service operation? The "rewrite-uri" ...