Most of us know the following syntax:
function funcName($param='value'){ echo $param; } funcName(); Result: "value"
We were wondering how to pass the default values ββfor the "not the last" parameter? I know this terminology is gone, but a simple example:
function funcName($param1='value1',$param2='value2'){ echo $param1."\n"; echo $param2."\n"; }
How do we do the following:
funcName(---default value of param1---,'non default'); Result: value1 not default
Hope this makes sense, we want to basically assume default values ββfor parameters that are not the last.
Thank.
function php parameters default
anonymous-one May 15 '12 at 8:44 2012-05-15 08:44
source share