title: Get value from Object array
body: <h1>Update, solved</h1>
  <p>I try to retrieve the value of an object (<code>stdClass</code>)
  I want to get the internship his name the <code>title</code>.</p>
  <pre><code>([&quot;title&quot;]=&gt; string(53) &quot;Mss ( Privaatpraktijk kinesitherapie Walravens Marc )&quot;).
  </code></pre>
  <p><em>My code:</em></p>
  <pre><code>foreach($gStartPositionStudents as $value) {
          foreach($gStartPositionInternships as $value2) {
              // each loop will add a row here.
              $row = array();
              // build the row
              $row[] = array('data' =&gt; $value-&gt;field_ugentid_student[0]['value']);
              $row[] = array('data' =&gt; $value2-&gt;title[0]['value']);
          }
          // add the row to the &quot;big row data (contains all rows)
          $rows[] = array('data' =&gt; $row);
      }
      $output = theme('table', $header, $rows);
      return $output;
  </code></pre>
  <p><em>Object array:</em></p>
  <pre><code>enter code here
  array(148) {
    [0]=&gt;
    object(stdClass)#466 (45) {
      [&quot;nid&quot;]=&gt;
      string(3) &quot;199&quot;
      [&quot;type&quot;]=&gt;
      string(11) &quot;stageplaats&quot;
      [&quot;language&quot;]=&gt;
      string(2) &quot;nl&quot;
      [&quot;uid&quot;]=&gt;
      string(2) &quot;33&quot;
      [&quot;status&quot;]=&gt;
      string(1) &quot;1&quot;
      [&quot;created&quot;]=&gt;
      string(10) &quot;1291279334&quot;
      [&quot;changed&quot;]=&gt;
      string(10) &quot;1301323146&quot;
      [&quot;comment&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;promote&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;moderate&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;sticky&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;tnid&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;translate&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;vid&quot;]=&gt;
      string(3) &quot;206&quot;
      [&quot;revision_uid&quot;]=&gt;
      string(2) &quot;16&quot;
      [&quot;title&quot;]=&gt;
      string(18) &quot;Pcv (campus Aalst)&quot;
      [&quot;body&quot;]=&gt;
      string(0) &quot;&quot;
      [&quot;teaser&quot;]=&gt;
      string(0) &quot;&quot;
      [&quot;log&quot;]=&gt;
      string(0) &quot;&quot;
      [&quot;revision_timestamp&quot;]=&gt;
      string(10) &quot;1301323146&quot;
      [&quot;format&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;nd_switch_bm&quot;]=&gt;
      string(0) &quot;&quot;
      [&quot;name&quot;]=&gt;
      string(12) &quot;stage.revaki&quot;
      [&quot;picture&quot;]=&gt;
      string(0) &quot;&quot;
      [&quot;data&quot;]=&gt;
      string(72) &quot;a:1:{s:13:&quot;form_build_id&quot;;s:37:&quot;form-f89b99e4a5249b192ff472579b826b00&quot;;}&quot;
      [&quot;field_stagedomein_audiologo&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_stagedomein_geneeskunde&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_stagedomein_lo&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_stagedomein_revaki&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          string(3) &quot;152&quot;
        }
      }
      [&quot;field_stagedomein_verpleeg&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_status&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          string(14) &quot;niet opgegeven&quot;
        }
      }
      [&quot;field_status_datum&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(4) {
          [&quot;value&quot;]=&gt;
          NULL
          [&quot;timezone&quot;]=&gt;
          string(15) &quot;Europe/Brussels&quot;
          [&quot;timezone_db&quot;]=&gt;
          string(15) &quot;Europe/Brussels&quot;
          [&quot;date_type&quot;]=&gt;
          string(4) &quot;date&quot;
        }
      }
      [&quot;field_locatieview&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;nid&quot;]=&gt;
          string(3) &quot;179&quot;
        }
      }
      [&quot;field_status_extra&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_status_stagedomein&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          string(6) &quot;Actief&quot;
        }
      }
      [&quot;field_maxcapstud_stagedomein&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          string(2) &quot;18&quot;
        }
      }
      [&quot;field_status_bevestigd_door&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;nid&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_aanpers_stageplaats&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;nid&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_extrainfo_stagedomein&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(2) {
          [&quot;value&quot;]=&gt;
          string(37) &quot;Capaciteit: 3 studenten alle periodes&quot;
          [&quot;format&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_percapaciteit_stageplaats&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_aanplaats_stageplaats&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_mentoren&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;nid&quot;]=&gt;
          string(3) &quot;178&quot;
        }
      }
      [&quot;field_persoon_stagedomein&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;nid&quot;]=&gt;
          NULL
        }
      }
      [&quot;has_body&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;taxonomy&quot;]=&gt;
      array(0) {
      }
    }
    [1]=&gt;
    object(stdClass)#469 (45) {
      [&quot;nid&quot;]=&gt;
      string(3) &quot;211&quot;
      [&quot;type&quot;]=&gt;
      string(11) &quot;stageplaats&quot;
      [&quot;language&quot;]=&gt;
      string(2) &quot;nl&quot;
      [&quot;uid&quot;]=&gt;
      string(2) &quot;33&quot;
      [&quot;status&quot;]=&gt;
      string(1) &quot;1&quot;
      [&quot;created&quot;]=&gt;
      string(10) &quot;1291281467&quot;
      [&quot;changed&quot;]=&gt;
      string(10) &quot;1301323440&quot;
      [&quot;comment&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;promote&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;moderate&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;sticky&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;tnid&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;translate&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;vid&quot;]=&gt;
      string(3) &quot;218&quot;
      [&quot;revision_uid&quot;]=&gt;
      string(2) &quot;16&quot;
      [&quot;title&quot;]=&gt;
      string(53) &quot;Mss ( Privaatpraktijk kinesitherapie Walravens Marc )&quot;
      [&quot;body&quot;]=&gt;
      string(0) &quot;&quot;
      [&quot;teaser&quot;]=&gt;
      string(0) &quot;&quot;
      [&quot;log&quot;]=&gt;
      string(0) &quot;&quot;
      [&quot;revision_timestamp&quot;]=&gt;
      string(10) &quot;1301323440&quot;
      [&quot;format&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;nd_switch_bm&quot;]=&gt;
      string(0) &quot;&quot;
      [&quot;name&quot;]=&gt;
      string(12) &quot;stage.revaki&quot;
      [&quot;picture&quot;]=&gt;
      string(0) &quot;&quot;
      [&quot;data&quot;]=&gt;
      string(72) &quot;a:1:{s:13:&quot;form_build_id&quot;;s:37:&quot;form-f89b99e4a5249b192ff472579b826b00&quot;;}&quot;
      [&quot;field_stagedomein_audiologo&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_stagedomein_geneeskunde&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_stagedomein_lo&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_stagedomein_revaki&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          string(3) &quot;128&quot;
        }
      }
      [&quot;field_stagedomein_verpleeg&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_status&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          string(14) &quot;niet opgegeven&quot;
        }
      }
      [&quot;field_status_datum&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(4) {
          [&quot;value&quot;]=&gt;
          NULL
          [&quot;timezone&quot;]=&gt;
          string(15) &quot;Europe/Brussels&quot;
          [&quot;timezone_db&quot;]=&gt;
          string(15) &quot;Europe/Brussels&quot;
          [&quot;date_type&quot;]=&gt;
          string(4) &quot;date&quot;
        }
      }
      [&quot;field_locatieview&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;nid&quot;]=&gt;
          string(3) &quot;210&quot;
        }
      }
      [&quot;field_status_extra&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_status_stagedomein&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          string(6) &quot;Actief&quot;
        }
      }
      [&quot;field_maxcapstud_stagedomein&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          string(1) &quot;4&quot;
        }
      }
      [&quot;field_status_bevestigd_door&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;nid&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_aanpers_stageplaats&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;nid&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_extrainfo_stagedomein&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(2) {
          [&quot;value&quot;]=&gt;
          string(40) &quot;Capaciteit: 1 student in periode 3 tem 6&quot;
          [&quot;format&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_percapaciteit_stageplaats&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_aanplaats_stageplaats&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_mentoren&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;nid&quot;]=&gt;
          string(3) &quot;208&quot;
        }
      }
      [&quot;field_persoon_stagedomein&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;nid&quot;]=&gt;
          NULL
        }
      }
      [&quot;has_body&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;taxonomy&quot;]=&gt;
      array(0) {
      }
    }
    [2]=&gt;
    object(stdClass)#472 (45) {
      [&quot;nid&quot;]=&gt;
      string(3) &quot;217&quot;
      [&quot;type&quot;]=&gt;
      string(11) &quot;stageplaats&quot;
      [&quot;language&quot;]=&gt;
      string(2) &quot;nl&quot;
      [&quot;uid&quot;]=&gt;
      string(2) &quot;33&quot;
      [&quot;status&quot;]=&gt;
      string(1) &quot;1&quot;
      [&quot;created&quot;]=&gt;
      string(10) &quot;1291281906&quot;
      [&quot;changed&quot;]=&gt;
      string(10) &quot;1301323440&quot;
      [&quot;comment&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;promote&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;moderate&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;sticky&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;tnid&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;translate&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;vid&quot;]=&gt;
      string(3) &quot;224&quot;
      [&quot;revision_uid&quot;]=&gt;
      string(2) &quot;16&quot;
      [&quot;title&quot;]=&gt;
      string(54) &quot;Mss ( Privaatpraktijk kinesitherapie Peeters Stefaan )&quot;
      [&quot;body&quot;]=&gt;
      string(0) &quot;&quot;
      [&quot;teaser&quot;]=&gt;
      string(0) &quot;&quot;
      [&quot;log&quot;]=&gt;
      string(0) &quot;&quot;
      [&quot;revision_timestamp&quot;]=&gt;
      string(10) &quot;1301323440&quot;
      [&quot;format&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;nd_switch_bm&quot;]=&gt;
      string(0) &quot;&quot;
      [&quot;name&quot;]=&gt;
      string(12) &quot;stage.revaki&quot;
      [&quot;picture&quot;]=&gt;
      string(0) &quot;&quot;
      [&quot;data&quot;]=&gt;
      string(72) &quot;a:1:{s:13:&quot;form_build_id&quot;;s:37:&quot;form-f89b99e4a5249b192ff472579b826b00&quot;;}&quot;
      [&quot;field_stagedomein_audiologo&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_stagedomein_geneeskunde&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_stagedomein_lo&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_stagedomein_revaki&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          string(3) &quot;128&quot;
        }
      }
      [&quot;field_stagedomein_verpleeg&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_status&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          string(14) &quot;niet opgegeven&quot;
        }
      }
      [&quot;field_status_datum&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(4) {
          [&quot;value&quot;]=&gt;
          NULL
          [&quot;timezone&quot;]=&gt;
          string(15) &quot;Europe/Brussels&quot;
          [&quot;timezone_db&quot;]=&gt;
          string(15) &quot;Europe/Brussels&quot;
          [&quot;date_type&quot;]=&gt;
          string(4) &quot;date&quot;
        }
      }
      [&quot;field_locatieview&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;nid&quot;]=&gt;
          string(3) &quot;213&quot;
        }
      }
      [&quot;field_status_extra&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_status_stagedomein&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          string(6) &quot;Actief&quot;
        }
      }
      [&quot;field_maxcapstud_stagedomein&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          string(1) &quot;6&quot;
        }
      }
      [&quot;field_status_bevestigd_door&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;nid&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_aanpers_stageplaats&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;nid&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_extrainfo_stagedomein&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(2) {
          [&quot;value&quot;]=&gt;
          string(38) &quot;Capaciteit: 1 student in alle periodes&quot;
          [&quot;format&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_percapaciteit_stageplaats&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_aanplaats_stageplaats&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;value&quot;]=&gt;
          NULL
        }
      }
      [&quot;field_mentoren&quot;]=&gt;
      array(1) {
        [0]=&gt;
        array(1) {
          [&quot;nid&quot;]=&gt;
          string(3) &quot;214&quot;
        }
      }
      [&quot;field_persoon_stagedomein&quot;]=&gt;
      array(2) {
        [0]=&gt;
        array(1) {
          [&quot;nid&quot;]=&gt;
          string(3) &quot;216&quot;
        }
        [1]=&gt;
        array(1) {
          [&quot;nid&quot;]=&gt;
          string(3) &quot;215&quot;
        }
      }
      [&quot;has_body&quot;]=&gt;
      string(1) &quot;0&quot;
      [&quot;taxonomy&quot;]=&gt;
      array(0) {
      }
    }
  </code></pre>