How to remove only the last character?

From: Date: Sat, 08 Feb 2003 13:21:18 +0000
Subject: How to remove only the last character?
Groups: php.general 
Request: Send a blank email to php-general+get-134864@lists.php.net to get a copy of this message
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 (#134864) next »