{
"listing": {
"@attributes": {
"domain": "example.com"
},
"tld": "com",
"sld": "example",
"owner": "John Smith"
}
}
I am needing to iterate through this JSON array and put the values into PHP variables so that I can return the values.
Example:
echo $sld;
would print:
example
Would I need to do this with a foreach loop (and if so how would I format this) or is there a easy built in function such as extract()
that will do this?