I have a $abcd variable and the following is the output:
echo $abcd;
//Output:
{
"NID": 2,
"STS": "3",
"Options": {
"Model": "model value",
"Location": "location value",
"Price": "price value",
"Name": "Value"
}
}
In the "Options" I have 3 names and values of each. The names are not fixed and could be anythings and the number of objects in Options could be any from 0 to 100. I'd like to know if there is any way (JSON format preferred) that I can assign the Names and their related values to two other variables.
$varName[0]=Model
$varValue[0]=model value
$varName[1]=Location
$varValue[1]=location value
$varName[2]=Price
$varValue[2]=price value