如何使用Preg_match_all从许多数据中获取单个值

时间:2019-04-19 02:07:19

标签: preg-match-all

我有一些关于我学校的数据,我想列出特定年龄的学生和老师,我有一个这样的例子 这是我们的数据:-

[{"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}]}

现在我想找出年龄为23岁且需要教师的第二个值为1的学生的用户名,那用户名是什么 我尝试了很多方法,但我找不到

0 个答案:

没有答案