Call function in an array in a property of a class

<>

This question already has an answer here:

Answers


$myClass = new myClass();
var_dump($myClass->array);

class myClass {

    public $array;

    function myClass(){
        $this -> array =  array( 'test' => rand(1,5) );
    }

}   

For more details: What is the better approach to initialize class variables?


Need Your Help

Overriding OnPaint on Button - Font different

vb.net winforms override onpaint

i am trying to Override OnPaint in WinForms Button controll. I want to align the Image and Text in the center, next to each other. As i am aware there is no way to do this with the default control....

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.