note 28163 deleted from language.oop by aidan

From: Date: Sat, 03 Jul 2004 14:55:20 +0000
Subject: note 28163 deleted from language.oop by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-72454@lists.php.net to get a copy of this message
Note Submitter: tomcat@techie.com ---- Creating Object collection is very easy in PHP. Actually, regular array can serve as one: class user { var $login; var $email; var $password; function user ( $login, $email, $password ) { $this->login = $login; $this->email = $email; $this->password=$password; } } $arrOBJ = array(); //This line is unnecessary, I would just use it to make code more readable. You can remove. $arrOBJ[] = new user("1","1","1"); $arrOBJ[] = new user("2","2","2"); echo "success: ".$arrOBJ[0]->login;

« previous php.notes (#72454) next »