How to echo an array in PHP?
- by Kaoukkos
The following code
$results = $facebook->api('/fql', array('q'=>'SELECT page_id, type FROM page_admin WHERE uid = me()'));
print_r($results);
returned me this array
Array
(
[data] => Array
(
[0] => Array
(
[page_id] => 204725966262837
[type] => WEBSITE
)
[1] => Array
(
[page_id] => 163703342377960
[type] => COMMUNITY
)
)
)
My question is how can I just echo the content without this structure? I tried
foreach ($results as $result) {
echo $result->type;
echo "<br>";
}