[英]How to access an object variable with @before
在对象中,我需要获取: attributes->id
SimpleXMLElement Object
(
[@attributes] => Array
(
[id] => 30
[field_type] => text
[base_type] => text
)
[label] => Service
[nowrap] => 0
[bold] => 0
[required] => 0
[appears_by_default] => 1
[find_enabled] => 1
[allow_new_choices] => 0
[sort_as_given] => 1
[carrychoices] => 1
[foreignkey] => 0
[unique] => 0
[doesdatacopy] => 1
[fieldhelp] => SimpleXMLElement Object
(
)
[num_lines] => 1
[maxlength] => 0
[append_only] => 0
[allowHTML] => 0
)
$att = "id";
$fids[] = (string)$field->attributes()->$att;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.