$x = "yourtexthere.";

$x = substr($x, 0, -1);

$x will then equal = "yourtexthere"

-m

-----Original Message-----
From: Dexter [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 27, 2001 6:45 PM
To: [EMAIL PROTECTED]
Subject: [PHP] How to chop off a char off end?


Using Perl , I usually say

$string=~s /,$//;

to chop off a particualr char on end.

How do you do this using PHP.

Thanks,

Dexter



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to