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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to