You maybe wanted to do the following:
foreach($user->data as $mydata)
{
echo $mydata->name . "\n";
foreach($mydata->values as $values)
{
echo $values->value . "\n";
}
}
More Related Contents:
- PHP Foreach returns separated(individual) arrays
- How to remove array index from json object while convert array to jsonobject php? [closed]
- How can I parse data from server using Json?
- how to read Json values [closed]
- How do I generate a JSON file from PHP array? [duplicate]
- How to Convert string response to array laravel
- Receive JSON POST with PHP
- PHP convert XML to JSON
- Performance of FOR vs FOREACH in PHP
- Converting MySQL result array to JSON [duplicate]
- Why does the PHP json_encode function convert UTF-8 strings to hexadecimal entities?
- handle json request in PHP
- PHP7.1 json_encode() Float Issue
- PHP json encode – Malformed UTF-8 characters, possibly incorrectly encoded [duplicate]
- jQuery ajax request with json response, how to?
- Android JSON HttpClient to send data to PHP server with HttpResponse
- How can I parse JSON into a html table using PHP?
- How to add square braces around subarray data inside of a json encoded string?
- How to modify an array’s values by a foreach loop?
- Removing array index reference when using json_encode()
- json decode in php
- While destructuring an array, can the same element value be accessed more than once?
- Escaping/encoding single quotes in JSON encoded HTML5 data attributes
- How to search through a JSON Array in PHP
- stdClass object and foreach loops
- How to insert json array into mysql database
- How to decode a JSON String with several objects in PHP?
- Access object property with disallowed character in property name
- Error “Cannot use object of type stdClass as array”
- Send JSON POST request with PHP