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, ∼3133🔥, 0💬
Popular Posts:
How to use the "Ctrl-p Ctrl-q" sequence to detach console from the TTY terminal of container's runni...
Where to find tutorials on OpenID? Here is a large collection of tutorials to answer many frequently...
Where to find tutorials on JSON (JavaScript Object Notation) text string format? I want to know how ...
What's Wrong with "while ($c=fgetc($f)) {}" in PHP? If you are using "while ($c=fgetc($f)) {}" to lo...
What is test testing area for? The testing area is provided to allow visitors to post testing commen...