access stdClass object called '$result'

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Rui Gonçalves
    New Member
    • Jun 2011
    • 2

    access stdClass object called '$result'

    Hello,

    I have a stdClass object called '$result' like this:

    Code:
    stdClass::__set_state(array(
       'return' => 
      stdClass::__set_state(array(
         'operationSuccessful' => true,
         'userStatus' => 'A',
         'validUser' => true,
      )),
    ))
    How can I access to operationSuccef ull or userStatus?
    I tried
    Code:
    $result->return->operationSuccefull
    and it didn't work.

    Thanks

    Rui Gonçalves
    Last edited by Dormilich; Jun 7 '11, 10:45 AM. Reason: added [code] tags
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    please define "didn’t work". does it give you an error, do you don’t get the output you assume?

    well, try $result->return->operationSucce ssful

    Comment

    • Rui Gonçalves
      New Member
      • Jun 2011
      • 2

      #3
      Hello again,

      Sorry for wasting your time (and mine as well), it was really a bad spelling error.
      Code:
      $result->return->operationSuccefull
      works.

      Any way, thanks for such a quick reply.

      Rui
      Last edited by Niheel; Jun 7 '11, 11:26 AM. Reason: Questions should be posted in new threads.

      Comment

      Working...