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, 2367🔥, 0💬
Popular Posts:
What is Azure API Management Gateway? Azure API Management Gateway is the Azure Web server that serv...
Can You Add Values to an Array without Keys in PHP? Can You Add Values to an Array with a Key? The a...
How to use .NET CLR Types in Azure API Policy? By default, Azure imports many basic .NET CLR (Common...
What is Azure API Management Developer Portal? Azure API Management Developer Portal is an Azure Web...
What is the "__init__()" class method? The "__init__()" class method is a special method that will b...