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, 2322🔥, 0💬
Popular Posts:
How to use the RSS Online Validator at w3.org? You can follow this tutorial to learn how to use the ...
How to start Docker Daemon, "dockerd", on CentOS systems? If you have installed Docker on your CentO...
How to convert JSON Objects to PHP Associative Arrays using the json_decode() function? Actually, JS...
How to add request body examples to my Azure API operation to make it more user friendly? If you hav...
How to view API details on the Publisher Dashboard of an Azure API Management Service? You can follo...