Re: removing last chr in string

From: Date: Fri, 27 Oct 2000 03:20:28 +0000
Subject: Re: removing last chr in string
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-22245@lists.php.net to get a copy of this message
Chop ($your_string); this will remove the whitespace and the newlines... ----- Original Message ----- From: "Jason Cox" <jasonc@webpipe.net> To: "Rebecca" <rebecca@digitalpulp.com> Cc: <php-general@lists.php.net> Sent: Thursday, October 26, 2000 5:32 PM Subject: RE: [PHP] removing last chr in string > 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 > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#22245) next »