Reply to Accessing stdClass object vars

Your name:

Reply:


Posted by JamesG on 03/01/07 01:43

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!

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация