Here is the code I'm currently using to fetch data from Asana API: I have tried this code so please tell me where I'm wrong.
$tasks = $client->fetch('https://app.asana.com/api/1.0/workspaces.json');
//print_r($tasks);
//as i do print_r then i get whole workspace data
$i=0;
//then i intialize counter with a value zero.
while(isset($tasks['result']['data'][$i]['id']))
{
//then go through loop to fetch data from array.
//print_r($tasks);
//then i cross check that array
$user_detail = $client->fetch('https://app.asana.com/api/1.0/workspaces/'.$tasks['result']['data'][$i]['id'].'/tasks.json');
//then i fetch tasks through url , in http header response is 200 ok , and i also cross check my account tasks also so where im wrong.
print_r($user_detail);