0

i have some data regarding my school i want to make a list of particular age students and teachers i have a example like this here is our data :-

[{"groupnumber":1,"groupid":1737983,"users":[{"id":2949,"user_name":"vishal kumaar","role":"classmate","bonus":"9","image":"www.example.com/myusers-8601.png","age":"25","classname":"9th","classmonitor":0,"teacher":0},{"id":2940,"user_name":"ravi kumar","role":"classmate","bonus":"9","image":"www.example.com/myusers-8601.png","age":"23","classname":"9th","classmonitor":0,"teacher":0},{"id":2948,"user_name":"raman","role":"classmate","bonus":"9","image":"www.example.com/myusers-8601.png","age":"25","classname":"9th","classmonitor":0,"teacher":1}]}

Now i want to find out username of student who have age 23 and second value in need teacher value is 1 then what is name of username i try many ways but i cant find out

  • This seems to be a JSON string, use [json_decode](https://www.php.net/manual/en/function.json-decode.php) – Toto Apr 19 '19 at 15:41
  • Possible duplicate of [How to decode a JSON String](https://stackoverflow.com/questions/2543389/how-to-decode-a-json-string) – Toto Apr 19 '19 at 15:43

0 Answers0