Re: How can I use a function's default arguments but change one of the end ones in the list?

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

 



On Thu, Feb 5, 2009 at 18:50, Daevid Vincent <daevid@xxxxxxxxxx> wrote:
> Is there a way to use the default values of a function without
> specifying every single one until the parameter you want to modify in
> PHP5 ?

    Daevid,

    Check out func_get_args(): http://php.net/func_get_args

    Then you can rename your sql_query() function to real_sql_query()
and create a new sql_query() as a wrapper function with
func_get_args() in place of statically-defined variables.

-- 
</Daniel P. Brown>
daniel.brown@xxxxxxxxxxxx || danbrown@xxxxxxx
http://www.parasane.net/ || http://www.pilotpig.net/
Unadvertised dedicated server deals, too low to print - email me to find out!

-- 
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