php - Why SimpleXML doesn't recognise fields with -


i'm parsing xml simple xml, there name doesn't looks understand, instance

xml

<item>          <art_id>34759</art_id>          <kind>car</kind>          <tics.item.dimension>215/55 r 16</tics.item.dimension>       </item> 

simple xml command

echo $item->art_id; // works echo $item->tics.item.dimension; // not work, shows "itemdimension" there value should show value 

do have in order explain simpexml . namespace of xml? think issue...

thanks in advance

just use:

$item->{'tics.item.dimension'} 

i'm late editing :)


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -