我有一个存储在 var 中的 PHP 对象,$category
它具有以下属性(用 转储print_r()
):
jstandCategory Object
(
[category_id] => 1
[category_image] =>
[category_parent_id] => 0
[category_publish] => 1
[category_ordertype] => 1
[category_template] => default
[category_ordering] => 1
[category_add_date] => 2013-03-18 22:10:45
[cars_page] => 6
[cars_row] => 1
[name_en-GB] => Used Cars
[alias_en-GB] => used-cars
[short_description_en-GB] =>
[description_en-GB] => <table>... some html code ...</table>
)
但是,当我尝试使用i get转储name_en-GB
属性时。我究竟做错了什么?上面的属性被转储得很好。print_r($category->name_en-GB);
0
name_en-GB