On 11 Mar 2009, at 11:42, Dan Field wrote:

As far as I was aware, member variable and object names had to start with a non integer chracter, however I am utilising a JSON lib which is providing me with the following resultset. As you can see a member class member is numerically named and I am unable to address it in the usual way. Is there a way around this?

echo $this->results->highlighting->000012192->t_text[0];

And to answer my own question, the answer is to use the following notation:

echo $this->results->highlighting->{'000012192'}->t_text[0];

Dan Field <d...@llgc.org.uk>                   Ffôn/Tel. +44 1970 632 582
Peiriannydd Meddalwedd                          Senior Software Engineer
Llyfrgell Genedlaethol Cymru                   National Library of Wales

Reply via email to