note 39157 deleted from function.substr by tomsommer
| From: | tomsommer@php.net | Date: | Mon, 19 Jan 2004 07:25:44 +0000 |
| Subject: | note 39157 deleted from function.substr by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-63815@lists.php.net to get a copy of this message | ||
Note Submitter: deanw@coastalnow.net
----
To pop the last character off of a string:
function popChar($str){
return(substr($str,0,-3));
}
I know, it's very simple. I spent around 15 minutes looking for this small solution, when it
should have been obvious. This is just for any other people who have blonde moments.