Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
Other Resources:
How To Remove Leading and Trailing Spaces from User Input Values
How To Remove Leading and Trailing Spaces from User Input Values? - PHP Script Tips - PHP Built-in Functions for Strings
✍: 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... ?>
2007-04-22, 4833👍, 0💬
Popular Posts:
.NET INTERVIEW QUESTIONS - How can you avoid deadlock in threading? A good and careful planning can ...
What is page thrashing? Some operating systems (such as UNIX or Windows in enhanced mode) use virtua...
From performance point of view how do they rate ? Repeater is fastest followed by Datalist and final...
What are the high-level thread states? The high-level thread states are ready, running, waiting, and...
How was XML handled during COM times? During COM it was done by using MSXML 4.0. So old languages li...