Re: array values format

From: Date: Thu, 20 Feb 2003 06:40:47 +0000
Subject: Re: array values format
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-136315@lists.php.net to get a copy of this message
On Thursday 20 February 2003 13:36, Michael P. Carel wrote: > as per testing it doesnt delete the last comma, i'm doing something like > this: > > for($i=0;$i<sizeof($images);$i++) > { > $pictures > .="\"./archive/bannerimages/".$bid[$i]."/".$images[$i]."\"".","; > } > preg_replace("/,$/","",$pictures); > echo $pictures; > > is there something wrong with pre_replace? Just use: $rest = substr("abcdef", 0, -1); // returns "abcde" to chop off the last character (comma). -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* In a medium in which a News Piece takes a minute and an "In-Depth" Piece takes two minutes, the Simple will drive out the Complex. -- Frank Mankiewicz */

« previous php.general (#136315) next »