Jump to content

Archived

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

taps128

How many returns() can a function have

Recommended Posts

Hi, all

I wanna write a function that returns several results. how man results can a function have?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

×

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.