SimpleXMLElement
Posted: Tue Jun 16, 2009 12:06 pm
When I try to access the @attributes created by simplexml i get the following error:
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `'{'' or `'$'' in C:\wamp\www\php_sandbox\rex_test.php on line 11
the code is a such:
foreach ($xml->token as $value){
echo "key == " .$value->@attributes['key'];
}
Is there a setting in PHP that is wrong?
Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `'{'' or `'$'' in C:\wamp\www\php_sandbox\rex_test.php on line 11
the code is a such:
foreach ($xml->token as $value){
echo "key == " .$value->@attributes['key'];
}
Is there a setting in PHP that is wrong?