Re: Invalid Arguements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2008-11-19 at 19:49 +0000, Ashley Sheridan wrote:
> On Wed, 2008-11-19 at 08:31 -0600, Terion Miller wrote:
> > I am still getting the Invalid arguement error on this implode:
> > 
> > if (isset($_POST['BannerSize'])){$BannerSize =
> > implode(',',$_POST['BannerSize']);} else {$BannerSize = "";}
> > 
> > I have moved the ',', from the beginning to the end of the statement and
> > nothing works is there any other way to do this, basically there is a form
> > and the people entering work orders can select different sized banners they
> > need, which goes into the db as text ....so...argh...
> 
> As mentioned quite a few times before, you cannot change the order of
> the arguments, it will not work! There is no indicator in the PHP Manual
> page for this function either that says you can switch the orders, so
> I'm not sure why you think you can.

In PHP 5.2.6 and in PHP 4.4.9 I get the same output for the following:

<?php

    $foo = array( 1, 2 );

   echo implode( $foo, ',' )."\n";
   echo implode( ',', $foo )."\n";

?>

I believe, that a long time ago it was added as a feature so that PHP
would detect inverted parameter order on this particular function and
output appropriately.

It is probably undocumented so as to encourage a single documented
order.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux