php - Output Array Items -
i'm using salesforce.com toolkit php , i'm trying output think simple.
this working example code
$query = "select id, phone contact limit 5"; $response = $mysforceconnection->query($query); foreach ($response->records $record) { echo $record->id." - ".$record->phone; }
i've tweaked query , want output name , count. code below not work
$query = "select owner.name, count(type) task limit 5"; $response = $mysforceconnection->query($query); foreach ($response->records $record) { echo $record->owner.name; //does not work }
this when print_r ($record);
stdclass object ( [id] => [any] => array ( [0] => first last [1] => 2177 ) )
i want able output "first last - 2177"
foreach ($response->records $record) { echo implode(' - ', $record->any); }
Comments
Post a Comment