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, 2821🔥, 0💬
Popular Posts:
How to login to the Developer Portal internally by you as the publisher? Normally, the Developer Por...
How to add images to my EPUB books Images can be added into book content using the XHTML "img" eleme...
How to read Atom validation errors at w3.org? If your Atom feed has errors, the Atom validator at w3...
How To Avoid the Undefined Index Error in PHP? If you don't want your PHP page to give out errors as...
How To Remove Slashes on Submitted Input Values in PHP? By default, when input values are submitted ...