I have an object in PHP, how do I loop through every member? Like a foreach for objects?
I have this object (which I printed using print_r), and I need to know how to loop through every member to do something with the data.
stdClass Object
(
[OrganizationId] => 00D300000006Iw4EAE
[ActionId] => 04k500000004CZpAAM
[SessionId] =>
[EnterpriseUrl] => https://na3-api.salesforce.com/services/Soap/c/8.0/
[PartnerUrl] => https://na3-api.salesforce.com/services/Soap/u/8.0/
[Notification] => stdClass Object
(
[Id] => 04l50000000LlctAAC
[sObject] => stdClass Object
(
[Id] => 0035000000SN1ZMAA1
[AccountId] => 0015000000Hq2pWAAR
[CreatedById] => 00550000000lnTzAAI
[CreatedDate] => 2007-08-02T21:20:38.000Z
)
)
)
If you liked this post, subscribe to Wpdesigner's RSS feed.
Filed under: Programming & Design

Leave a Reply