alund1987 Posted January 3, 2007 Share Posted January 3, 2007 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 More sharing options...
ShogunWarrior Posted January 3, 2007 Share Posted January 3, 2007 You can return whatever you want. You do not have to return one of the inputs, in fact doing so is kind of useless. Link to comment https://forums.phpfreaks.com/topic/32735-functions/#findComment-152383 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.