I am trying to pull an element out of an array to assign it to a variable, but not having much luck so far... This is my code.
$email = $clientEmail;
$returnFields = array('Id', 'FirstName');
$data = $app->findByEmail($email, $returnFields);
if($debug){
echo "<pre>Contact Info:";
print_r($data[0]);
echo "ID is:";
list($contactId, $contactName) = $data[0];
echo $contactId;
echo "</pre>";
}
Which returns this...
Contact Info:Array
(
[FirstName] => Scooby1
[Id] => 59871
)
ID is:
I've tried using the list(), explode(), and implode(), but I can't seem to pull [Id] out and assign it's value to a variable. How else can I go about this?
$data[0]['FirstName']and$data[0]['Id']