I have the following part of my xml:
<book number="AB 123" type="SCI">
<info>
<type code="FIC"><![CDATA[Fiction]]></status>
<publish-time><![CDATA[20090110214000]]></publish-time>
</info>
</book>
If I do:
echo $key->info->type;
I get nice and easy "Fiction"
BUT if I do:
echo $key->info->publish-time;
I get "0".
I thought it might have to do with this (20090110214000) being a number, but I tried various ways to extract that but with no success. When I print_r
I see the 20090110214000 just fine in there but why can I not get that value (as a number or string) to be echoed or assign it to a variable?