Simple: Your suggestions for function parameters?
Posted: Thu May 08, 2008 9:57 am
I just do not recall ever utilizing functions in PHP though I absolutely love and use them in JavaScript all the time. I'm curious about what I can do with parameters in PHP that may be useful but that I can not do in JavaScript. Here are a couple working examples that I put together... Yeah kind of strange that I have not begun messing with functions until this point. 
Code: Select all
function my_function($my_parameter1, $my_parameter2)
{
echo $my_parameter1.$my_parameter2;
}
my_function('h','i');Code: Select all
$my_parameter1 = 'g';
$my_parameter2 = 'o';
function my_function($my_parameter1, $my_parameter2)
{
echo $my_parameter1.$my_parameter2;
}
my_function($my_parameter1,$my_parameter2