On Sat, October 14, 2006 5:06 am, Deckard wrote:
> How can i code a class with a function that returns more than one
> value ?

Classes do not return values.

Functions return values.

Class methods (which are very much like functions) return values.

In PHP, functions/methods do not return more than one value.

You must wrap your multiple values up into some kind of more complex
(non-scalar) structure.

An array or an instance of a class will both work fine.

Which one is appropriate depends on the existing application,
framework, and personal religious convictions of code develoment.

YMMV

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to