Re: remove last character in a string
| From: | Tyler Longren | Date: | Tue, 23 Apr 2002 03:28:44 +0000 |
| Subject: | Re: remove last character in a string | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-94101@lists.php.net to get a copy of this message | ||
First, you'll need to get the length of the str with the str_len() function.
After you have that, use the substr() function like Rasmus mentioned.
Tyler Longren
Captain Jack Communications
www.captainjack.com
tyler@captainjack.com
----- Original Message -----
From: "Craig Westerman" <westerman@chanuteks.com>
To: "php-general-list" <php-general@lists.php.net>
Sent: Monday, April 22, 2002 10:26 PM
Subject: [PHP] remove last character in a string
> I have a string that ends in a comma. What is best method to remove the
> comma?
>
> Craig ><>
> westerman@chanuteks.com
>