I have tried a few things. to no avail. What I would like to do is get the ID , which lies inside 'leadRecord'. This I am able to do. i use this code.
$leadId = $checkLead->result->leadRecordList->leadRecord->Id;
But when I try to retrieve a record's first name value, I am unable to get it. this is what I was using.
$firstname = $checkLead->leadAttributeList->attribute[0]->attrValue;
I have also been playing with this code, just to get it to spit out all values in the arrays.
$myArray = (array)$checkLead;
echo 'What have we here? '.var_export($myArray, true);
foreach($myArray as $row => $innerArray){
foreach($innerArray as $innerRow => $innerinnerArray){
foreach($innerinnerArray as $innerinnerRow => $value){
echo $value . "
";
}
}
}
as you see on the link I provided, I could recieve 1 or many records. I need to verify I have the right one. I will know based on user input their first and last name. So, I would like to iterate through the leadRecords and say 'if the input values match the array values,give me the ID of the lead and any other attribute values I ask for.' For example, their could be an attribute called 'phone number'. I would like to be able to retrieve that.
Does that explain it better?