I want to populate an array with objects..
my class:
class MyOrderClass {
public $id;
public $many;
public $cost;
public function __construct($id, $many, $cost) {
$this->id = $id;
$this->many = $many;
$this->cost = $cost;
}
}
and i want to have something like this :
$orders[0]->id = 1;
$orders[0]->many = 1;
$orders[0]->cost = 100;
can you help me ?