Welcome Guest, Not a member yet? Register   Sign In
optional parameters in functions
#2

[eluser]Dam1an[/eluser]
For an optional parameter, you just set it a default value
So:
Code:
function my_function($i_need_this_paramter, $optional_second_parameter = 'a default value') {
  ...
}


Messages In This Thread
optional parameters in functions - by El Forum - 09-07-2009, 09:07 AM
optional parameters in functions - by El Forum - 09-07-2009, 09:16 AM
optional parameters in functions - by El Forum - 09-07-2009, 09:18 AM
optional parameters in functions - by El Forum - 09-07-2009, 11:41 AM



Theme © iAndrew 2016 - Forum software by © MyBB