Re: Annoying syntax problem with RTRIM

From: Date: Thu, 04 Jul 2002 19:53:13 +0000
Subject: Re: Annoying syntax problem with RTRIM
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-105494@lists.php.net to get a copy of this message
Actually I did see the "4.1.0", but mis-read it thinking "4.0.1".... (I did read the manual, just not carefully enough. (Thank you, Mr. Wong, for your helpful reply.)) Anyways, I came up with a workaround until my ISP upgrades PHP: $str = rtrim($str); if (substr($str,-1) == ",") { $str = substr($str,0,-1); } Seems to work okay. ...Rene On Thursday, July 4, 2002, at 01:45 PM, Paul Roberts wrote:
string rtrim ( string str [, string charlist]) Note: The second parameter was added in PHP 4.1.0
                                                                                        ^hint
get them to upgrade php for you. Paul Roberts roberts_paul@bigfoot.com ++++++++++++++++++++++++ ----- Original Message ----- From: "René Fournier" <rene@smartslitters.com> To: <php-general@lists.php.net> Sent: Thursday, July 04, 2002 6:00 PM Subject: Re: [PHP] Annoying syntax problem with RTRIM I did. It didn't help. (That's why I posted this message.) On Thursday, July 4, 2002, at 10:47 AM, Jason Wong wrote:
On Friday 05 July 2002 00:41, René Fournier wrote:
echo rtrim($feat,", "); On my local Apache-OSX web server (PHP 4.1.2), this command works fine. (The reason I use it is that sometimes $feat contains a comma and a space at the end of the string, which I want to remove (if it's there) before echoing.) When this same script is run on my ISP (PHP 4.0.6), I get the following error message: <b>Warning</b>: Wrong parameter count for rtrim() in <b>/u/htdocs/smarts/jupiter/callisto/include/create.inc</b> on line <b>216</b><br> Any ideas why?
RTFM! -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* The heart is wiser than the intellect. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php ---
René Fournier, rene@smartslitters.com Toll-free +1.888.886.2754 Tel +1.403.291.3601 Fax +1.403.250.5228 www.smartslitters.com SmartSlitters International #33, 1339 - 40th Ave NE Calgary AB T2E 8N6 Canada
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.general (#105494) next »