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, ∼3416🔥, 0💬
Popular Posts:
How to run PowerShell Commands in Dockerfile to change Windows Docker images? When building a new Wi...
How to pull NVIDIA CUDA Docker Image with the "docker image pull nvidia/cuda" command? If you are ru...
How to add request query string Parameters to my Azure API operation to make it more user friendly? ...
How to use the Atom Online Validator at w3.org? w3.org feed validation service is provided at http:/...
How To Read a File in Binary Mode in PHP? If you have a file that stores binary data, like an execut...