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, ∼4011🔥, 0💬
Popular Posts:
Where to find tutorials on PHP language? I want to know how to learn PHP. Here is a large collection...
How to use "json-to-xml" Azure API Policy Statement? The "json-to-xml" Policy Statement allows you t...
How to Build my "sleep" Docker image from the Alpine image? I want the container to sleep for 10 hou...
Where to find tutorials on Microsoft Azure services? Here is a large collection of tutorials to answ...
How to register and get an application ID from Azure AD? The first step to use Azure AD is to regist...