note 69217 added to function.rtrim
| From: | nat dot burke at NOSPAM dot gmail dot com | Date: | Sun, 27 Aug 2006 23:00:56 +0000 |
| Subject: | note 69217 added to function.rtrim | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-116390@lists.php.net to get a copy of this message | ||
Here is a quick way to trim the last word in a string:
<?php
$trim = "example";
$string = "This is an example";
$string = substr($string, 0, strrpos($string, $trim));
?>
----
Server IP: 216.194.113.175
Probable Submitter: 65.78.160.129
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.rtrim.php
Edit -- https://master.php.net/note/edit/69217
Del: integrated -- https://master.php.net/note/delete/69217/integrated
Del: useless -- https://master.php.net/note/delete/69217/useless
Del: bad code -- https://master.php.net/note/delete/69217/bad+code
Del: spam -- https://master.php.net/note/delete/69217/spam
Del: non-english -- https://master.php.net/note/delete/69217/non-english
Del: in docs -- https://master.php.net/note/delete/69217/in+docs
Del: other reasons-- https://master.php.net/note/delete/69217
Reject -- https://master.php.net/note/reject/69217
Search -- https://master.php.net/manage/user-notes.php