You could store the instances in a collection (such as an Array). Sample code below:
<?php
require_once('Car.php'); // or whatever that file is called
carArray = array();for($i=0; $i < 30; $i++) {
$carArray[] = new Car();
}// see if the collection is holding the right stuff print_r($carArray);
?>
Hope that helps, Mike
On Tuesday, August 19, 2003, at 03:04 PM, Nick W wrote:
C++/PHP nube question...
Say I create class car, and want 30 instances, named car1-car30 (or
something). Is it possible to use a for... loop to do that? Better put...how
the heck do you do that?
--
Nick W ([EMAIL PROTECTED])
Registered Linux User #324288 (http://counter.li.org)
MSN Messenger: [EMAIL PROTECTED]
Yahoo: foolish_gambit
ICQ: 303276221
Website: www.fromthecrosstothethrone.com
