|
Posted by Hendri Kurniawan on 03/01/07 01:58
get_object_vars will actually give you an array of properties an object have
Hendri
JamesG wrote:
> Hi,
>
> I have the following object, I need to extract the SysMessage
> property.
>
> stdClass Object ( [UnknownConsignment] => stdClass Object
> ( [SysMessage] => Your consignment could not be found on our
> system ) )
>
> I could do this:
> $object->UnknownConsignment->SysMessage
>
> However, depending on the condition, the "UnknownConsignment" property
> might be called something else.
> Therefore, I need a solution, something like an array:
> $object->[0]->SysMessage
>
> Thanks in advance!
>
Navigation:
[Reply to this message]
|