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, ∼3412🔥, 0💬
Popular Posts:
How to use the "set-backend-service" Policy Statement for an Azure API service operation? The "set-b...
How to install "C++/CLI Support" component in Visual Studio? I need to build my Visual Studio C++/CL...
What are the differences of Differences of evaluateTransaction() and submitTransaction() of the fabr...
What properties and functions are supported on requests.models.Response objects? "requests" module s...
How to use the Atom Online Validator at w3.org? w3.org feed validation service is provided at http:/...