I have an object I need to parse out and insert into SQL but I am having a hard time figuring out what I need to do as far as the order of fields in the syntax listed below.
Here is the object vardump:
object(EmailCheck\Object\ResponseObject)#25 (1) {
["response":protected]=> array(6) {
["status"]=> string(7) "success"
["total_results"]=> int(6)
["total_pages"]=> int(1)
["query"]=> array(8) {
["job_id"]=> int(2562625)
["valids"]=> int(1)
["invalids"]=> int(1)
["disposables"]=> int(1)
["catchalls"]=> int(1)
["unknowns"]=> int(1)
["page"]=> int(0)
["items_per_page"]=> int(10)
}
["results"]=> array(6) {
[0]=> array(2) {
["data"]=> array(4) {
["email"]=> string(20) "chris@example.com"
[0]=> string(1) "1"
["ID"]=> string(1) "1"
["EMAIL"]=> string(20) "chris@example.com"
}
["verification"]=> object(EmailCheck\Object\VerificationObject)#7 (1) {
["response":protected]=> array(7) {
["result"]=> string(5) "valid"
["flags"]=> array(3) {
[0]=> string(7) "has_dns"
[1]=> string(10) "has_dns_mx"
[2]=> string(16) "smtp_connectable"
}
["suggested_correction"]=> string(0) ""
["address_info"]=> object(EmailCheck\Object\ResponseObject)#9 (1) {
["response":protected]=> array(9) {
["original_email"]=> string(20) "chris@example.com"
["normalized_email"]=> string(20) "chris@example.com"
["addr"]=> string(6) "chris"
["alias"]=> string(0) "" ["host"]=> string(13) "example.com"
["fqdn"]=> string(13) "example.com"
["domain"]=> string(9) "example"
["subdomain"]=> string(0) ""
["tld"]=> string(3) "com"
}
}
["email"]=> string(20) "chris@example.com
["result_integer"]=> int(0)
["credits_info"]=> object(EmailCheck\Object\ResponseObject)#8 (1) {
["response":protected]=> array(0) {
}
}
}
}
}
I know the syntax is something like this but it is not returning anything:
echo $object->data->email;
I need to extract the following fields: result, normalized_email, email