tags:

views:

58

answers:

2

Hi, how get information from Object?

$cars = new Cars($car_color, $car_id, $car_speed); 
CAR_class::cars($cars, $car_speed); 

Thanks

+1  A: 

Assuming you just mean to access the $cars object's variables...

You should have some sort of getter function within your Car class that returns the object's variables. for instance:

public function getColor() {

     return $this->color;
}

Then you would call the function using something like:

$cars->getColor();
Joey C.
+2  A: 

get_object_vars() is a winrar. :-D

Dan