Use $obj = json_decode($yourJSONString);
to convert it to an object.
Then use foreach($obj->response->docs as $doc)
to iterate over the “docs”.
You can then access the fields using $doc->student_id
and $doc->student_name[0]
.
More Related Contents:
- Getting particular object
- How can I parse a JSON file with PHP? [duplicate]
- Reading JSON POST using PHP
- How to POST JSON Data With PHP cURL?
- json_decode returns NULL after webservice call
- Cannot use object of type stdClass as array?
- PHP json_encode encoding numbers as strings
- REST API – why use PUT DELETE POST GET?
- PHP json_decode() returns NULL with valid JSON?
- How to convert mysqli result to JSON? [duplicate]
- php json_encode not working on arrays partially
- Any way to return PHP `json_encode` with encode UTF-8 and not Unicode? [duplicate]
- Why is this PHP call to json_encode silently failing – inability to handle single quotes?
- JavaScript: How do I create JSONP?
- Send post request using Volley and receive in PHP
- Convert invalid json into valid json
- Best way to create an empty object in JSON with PHP?
- PHP’s json_encode does not escape all JSON control characters
- Adding subscribers to a list using Mailchimp’s API v3
- POST request with JSON body
- Parsing JSON array with PHP foreach
- ‘Malformed UTF-8 characters, possibly incorrectly encoded’ in Laravel
- Send data from android to server via JSON
- How to pass an array using PHP & Ajax to Javascript?
- Find JSON strings in a string
- How can I access an object property named as a variable in php?
- how to fetch all the row of the result in php mysql?
- json_encode not working with a html string as value
- Add new data into PHP JSON string
- Arabic Characters in JSON decoding [duplicate]