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, ∼3429🔥, 0💬
Popular Posts:
How To Set session.gc_divisor Properly in PHP? As you know that session.gc_divisor is the frequency ...
How to access Request body from "context.Request.Body" object in Azure API Policy? Request body is t...
How to detect errors occurred in the json_decode() call? You can use the following two functions to ...
How to use .NET CLR Types in Azure API Policy? By default, Azure imports many basic .NET CLR (Common...
What Is session_register() in PHP? session_register() is old function that registers global variable...