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, ∼3891🔥, 0💬
Popular Posts:
How to view API details on the Publisher Dashboard of an Azure API Management Service? You can follo...
How to access URL template parameters from "context.Request.Matched Parameters"object in Azure API P...
How To Create an Array with a Sequence of Integers or Characters in PHP? The quickest way to create ...
How to use the urllib.request.Request object to build more complex HTTP request? The urllib.request....
Where to see some Examples of Invalid JSON Values? Here are some Examples of Invalid JSON Values: 1....