Can anyone please help me for converting the string into an Array or JSON as well? Please take look on the text sample below;
{
"account_id": "dfdfdf",
"email": "[email protected]",
"id": "dfdfdf",
"name": "Gmail Team",
"object": "contact",
"phone_numbers": []
},
{
"account_id": "dfdf",
"email": "[email protected]",
"id": "dfdf",
"name": "Ab",
"object": "contact",
"phone_numbers": []
},
{
"account_id": "dfdf",
"email": "[email protected]",
"id": "dfdfdf",
"name": "xyz",
"object": "contact",
"phone_numbers": []
},
I have tried
preg_match_all("/\{([^\)]*)\},/", $stream[0], $aMatches);
But it doesn't return anything. I also have tried json_decode, json_encode but could not find any success on it.
Thanks