开发者

php, data from object [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. 开发者_StackOverflow Closed 12 years ago.

how get information from Object?

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

Thanks


get_object_vars() is a winrar. :-D


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();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜