note 39472 deleted from function.strrchr by tomsommer
| From: | tomsommer@php.net | Date: | Thu, 29 Jan 2004 21:50:16 +0000 |
| Subject: | note 39472 deleted from function.strrchr by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-64396@lists.php.net to get a copy of this message | ||
Note Submitter: melker@jazzfree.com
----
Here's an even simpler way to reverse the function of strrchr(). To return the part of $this
that goes before the last occurrence of $char:
<?
substr($this,0,-strlen(strrchr($this,$char)))
?>