Now, this must be a VERY stupid question, but i would like it answered if possible.
Can i make a function that returns a class?
Probably not, but...
I am VERY used to C structs, and for multiple results from a database query, i would like the functions to return a struct. But there are no structs in PHP, aren't they?
The other way is to return a bi-dimensional array, but i have to "cut" it in smaller unidimensional arrays, and i CAN'T make a function to cut them all and then return them ALL at once. (Would be like returning a struct)
The other alternative was to pass the arrays by reference in the functions, instead of passing by value, but it seems that passing arguments by reference will soon be deprecated in PHP.
So, any solution to my problem? I only need a function to return a class, a struct or a union.
Well, i said it was a stupid question. Nonetheless, i would like it answered.
Thanks very much in advance.
fLIPIS
"Do it or don't. But don't just try"
-- Yoda --