RE: [PHP] arrays as object properties

From: Date: Wed, 25 Oct 2000 18:15:15 +0000
Subject: RE: [PHP] arrays as object properties
Groups: php.general 
Request: Send a blank email to php-general+get-21885@lists.php.net to get a copy of this message
Try putting global $parts in your init function. Hope that helps. Chris Mulcahy -----Original Message----- From: Rebecca [mailto:rebecca@digitalpulp.com] Sent: Monday, October 23, 2000 12:29 PM To: php-general@lists.php.net Subject: [PHP] arrays as object properties so if i have: class car { var $parts; function init($new_parts) { $this->parts = $new_parts; } } how can i make this work: $parts = array("radio","four_w_drive","mats","si"); $car = new car; //the following peice of code is the trouble......i can't seem to make an object property an array.... $car->init($parts); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#21885) next »