Jump to content

functions


alund1987

Recommended Posts

This might be a really stupid question but if I have a function with two inparameters do I have to return them both, by the way I am going to use just one of the inparameters..as the example shown below:

function check($array1, $array2) {
for($i =0; $i <=10; $i++) {
  if($array2 ==1) {
  $array[$i] = rand(1, 5);
}
  }
return($array1);
}

Is this ok?
Link to comment
https://forums.phpfreaks.com/topic/32735-functions/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.