|
Posted by ZeldorBlat on 08/30/07 20:04
On Aug 30, 3:37 pm, "Jeff" <it_consulta...@hotmail.com.NOSPAM> wrote:
> php 5.x
>
> I'm wondering if it is possible to make class methods in php returrn
> 2-dimensional arrays?
Yes.
>
> If it is possible then please explain how, maybe you have a good link about
> the subject, then please post it :)
>
> Jeff
Just like returning anything else from any other method. You don't
need to do anything special because it's an array or because it's a
class method.
class Foo {
public static function bar() {
$a = array(array(0, 1, 2), array(3, 4, 5), array(6, 7, 8));
return $a;
}
}
$x = Foo:bar();
print_r($x);
[Back to original message]
|