Answer the question
In order to leave comments, you need to log in
How to translate the response from the flex server into a normal object?
Good afternoon. I'm making a flex application parser in php. I am using the SabreAMF library. Everything is fine, the data is being received and sent. Only here the answer comes like this:
Array
(
[SabreAMF_TypedObjectamfClassName] =>
[SabreAMF_TypedObjectamfData] => Array
(
[country] => RU
[totalOnlineInfo] => SabreAMF_TypedObject Object
(
[amfClassName:SabreAMF_TypedObject:private] =>
[amfData:SabreAMF_TypedObject:private] => Array
(
[activeCount ] => 47485
[onlineCount] => 3632
[maxPopulation] => 183349
[totalCount] => 63046
[internalActiveCount] => 30155
).....
var_dump($response['SabreAMF_TypedObjectamfData']);
// Notice: Undefined index: SabreAMF_TypedObjectamfData
Answer the question
In order to leave comments, you need to log in
Make echo gettype($response);
Most likely there will be "object".
Then try like this:echo $response->country;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question