taps128 Posted April 27, 2006 Share Posted April 27, 2006 Hi, allI wanna write a function that returns several results. how man results can a function have? Quote Link to comment Share on other sites More sharing options...
ober Posted April 27, 2006 Share Posted April 27, 2006 Functions normally only return one item. However, I believe you could return an array of items.You may also want to look into a class for returning multiple items. Quote Link to comment Share on other sites More sharing options...
Orio Posted April 27, 2006 Share Posted April 27, 2006 As if you will look here:[a href=\"http://www.php.net/manual/en/function.return.php\" target=\"_blank\"]http://www.php.net/manual/en/function.return.php[/a]You will see that: "the return() statement immediately ends execution of the current function, and returns its argument as the value of the function call".But as ober said, you can use arrays.Orio. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.