Re: How to remove only the last character?
| From: | Kevin Waterson | Date: | Sun, 09 Feb 2003 02:58:56 +0000 |
| Subject: | Re: How to remove only the last character? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-134931@lists.php.net to get a copy of this message | ||
This one time, at band camp,
Douglas Douglas <replaceafill@yahoo.com> wrote:
> Good day.
>
> Is there any PHP function that removes only the last
> character of a string and returns the new string?
$new = substr("$string", 0, -1);
Kevin
--
______
(_____ \
_____) ) ____ ____ ____ ____
| ____/ / _ ) / _ | / ___) / _ )
| | ( (/ / ( ( | |( (___ ( (/ /
|_| \____) \_||_| \____) \____)
Kevin Waterson
Port Macquarie, Australia