I m 试图通过使用PHP的Json阵列搜索:
{"count":"2","items":{"milestone":[{"id":"3107","username":"TomSmith1","userid":"1620602","date":"2012-01-12 16:49:26","projectid":"804","projectname":"TEST PROJECT","reason":"Partial payment for project","amount":"25","currency":"1"},{"id":"3111","username":"HarryCole","userid":"1620603","date":"2012-01-13 16:42:39","projectid":"804","projectname":"TEST PROJECT 2","reason":"Partial payment for project","amount":"10","currency":"1"}]}}
我想通过这一方法寻找“id”,该项目的名称是“TEST PROJECT 2”和用户名称“HarryCole”。 我曾尝试使用<代码>foreach loop,但n t继承。 谁能向我指出正确的方向? 感谢。