On Tue, 2008-11-18 at 16:52 -0600, Terion Miller wrote: > I changed the implode to : > if (isset($_POST['BannerSize'])){$BannerSize = implode(',', > $_POST['BannerSize']);} else {$BannerSize = "";} > > now it says "Invalid Arguement" whereas when it was the other way it didn't > > > On Tue, Nov 18, 2008 at 12:38 AM, Jim Lucas <lists@xxxxxxxxx> wrote: > > > Terion Miller wrote: > > > >> Help I inherited this script and just found that its not inserting > >> anything > >> into the "workorderform" table in the db, and I'm getting implode() errors > >> for the 'bannersize' isset line > >> > >> New and need help in over my head: > >> here is the code: > >> > >> > >> > > First off, I would argue that this code never worked, unless you changed > > the order of the arguments being passed to your implode() calls. > > > > The arguments are backwards in all three calls. > > > > check out this > > > > http://php.net/implode > > > > it might give you insight on how to make it work. > > > > -- > > Jim Lucas > > > > "Some men are born to greatness, some achieve greatness, > > and some have greatness thrust upon them." > > > > Twelfth Night, Act II, Scene V > > by William Shakespeare > > > > I can see nothing wrong with that. I also just read the implode manual page quickly, and it definitely does not say you can use the arguments the other way around. What it does say is that the glue parameter is optional, and is wrongly the first parameter as it's usual for optional parameters to be on the right hand side of the arguments list. On a personal note (just my code style really) I'd change the above to the shorthand version, as you're only using the if for a simple assignment: $BannerSize = (isset($_POST['BannerSize']))?implode(",", $_POST['BannerSize']):""; Ash www.ashleysheridan.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php