Reply to Re: class methods & arrays

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация