Re: How to remove only the last character?

From: Date: Sat, 08 Feb 2003 13:33:50 +0000
Subject: Re: How to remove only the last character?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-134867@lists.php.net to get a copy of this message
www.php.net/substr -- Regards. M.CHAILLAN Nicolas nicos@php.net www.WorldAKT.com Hébergement de sites internets. "Douglas Douglas" <replaceafill@yahoo.com> a écrit dans le message de news: 20030208132118.36230.qmail@web21306.mail.yahoo.com... > Good day. > > Is there any PHP function that removes only the last > character of a string and returns the new string? > > I'm looking in the manual and I can't find anything. > > Until now I'm doing this: > > $var=substr($var,0,strlen($var)-1) > > Is this the most efficient way? > > Thanks. > > __________________________________________________ > Do you Yahoo!? > Yahoo! Mail Plus - Powerful. Affordable. Sign up now. > http://mailplus.yahoo.com

« previous php.general (#134867) next »