Tuesday, 20 August 2013

Can foreach loop contain value as an object?

Can foreach loop contain value as an object?

foreach ($result as $key => $value) {
}
In this can the $value be an object like the following given below , where
10 is the key and other is value
[10] => stdClass Object
(
[nid] => 80
[type] => create_an_account
)
Is this valid ??

No comments:

Post a Comment