note 126209 added to function.trim
| From: | atulkumar dot softwaredev at gmail dot com | Date: | Fri, 02 Jul 2021 09:21:45 +0000 |
| Subject: | note 126209 added to function.trim | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-216567@lists.php.net to get a copy of this message | ||
// trim() function is widely used in forms
/* It clears off the extra whitespace (more than one) and other characters (specified by user) from
the input fields
*/
// Example:
$username = " Sir Rasmus Lerdorf ";
$username = rtrim($username);
echo $username; // Try to use echo instead of print
// Output: Sir Rasmus Lerdorf
----
Server IP: 45.112.84.4
Probable Submitter: 45.112.85.242 (proxied: 117.194.113.156)
----
Manual Page -- https://php.net/manual/en/function.trim.php
Edit -- https://main.php.net/note/edit/126209
Del: integrated -- https://main.php.net/note/delete/126209/integrated
Del: useless -- https://main.php.net/note/delete/126209/useless
Del: bad code -- https://main.php.net/note/delete/126209/bad+code
Del: spam -- https://main.php.net/note/delete/126209/spam
Del: non-english -- https://main.php.net/note/delete/126209/non-english
Del: in docs -- https://main.php.net/note/delete/126209/in+docs
Del: other reasons-- https://main.php.net/note/delete/126209
Reject -- https://main.php.net/note/reject/126209
Search -- https://main.php.net/manage/user-notes.php