RE: [PHP] removing last chr in string
| From: | Jason Cox | Date: | Fri, 27 Oct 2000 00:32:18 +0000 |
| Subject: | RE: [PHP] removing last chr in string | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-22241@lists.php.net to get a copy of this message | ||
Try:
$string = substr(0,strrpos($string,',')-1);
Jason
> -----Original Message-----
> From: Rebecca [mailto:rebecca@digitalpulp.com]
> Sent: Thursday, October 26, 2000 3:35 PM
> To: php-general@lists.php.net
> Subject: [PHP] removing last chr in string
>
>
> is there a quick and easy way to remove the last character in a
> string if it is not a whitespace, newline, tab, etc?
> the last character is always a comma - i want to remove the comma.
>
_______________________________________________________
Site Design, Hosting, and E-Commerce at www.webpipe.net