Re: Question regarding OO
| From: | Ted Wood | Date: | Fri, 11 Jul 2008 16:19:24 +0000 |
| Subject: | Re: Question regarding OO | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-276659@lists.php.net to get a copy of this message | ||
Corrected code example:
(too early in the morning to think)
<?php
class ParkingLot {
var $size;
var $num_spaces;
var $spaces = array();
}
class ParkingSpace {
var $ps_ID;
var $occupied_by;
var $st_time;
}
?>
In the above class definition, simply populate the $spaces array with instances of the ParkingSpace class.
~Ted