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, ∼3378🔥, 0💬
Popular Posts:
How to use "xml-to-json" Azure API Policy Statement? The "xml-to-json" Policy Statement allows you t...
What is the "__init__()" class method? The "__init__()" class method is a special method that will b...
How to use the JSON to XML Conversion Tool at freeformatter.com? If you want to try the JSON to XML ...
What are the differences of Differences of evaluateTransaction() and submitTransaction() of the fabr...
Where to see some Examples of Invalid JSON Values? Here are some Examples of Invalid JSON Values: 1....