Jump to content

Loop through an object?


Perad

Recommended Posts

print_r($friends);

 

Gives me the following.

 

Array

(

    [1] => stdClass Object

        (

            [id] => 35231793]

        )

    [2] => stdClass Object

        (

            [id] => 35231794]

        )

    // Continue 30 more times.

)

 

How do I loop through this array and echo out the id value?

Link to comment
https://forums.phpfreaks.com/topic/168257-loop-through-an-object/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.