2016-09-21 2 views
-1

I가 내가 가져올 모든 주에서 다음 문자열 :PHP의 json_decode 여러 개체 (주문)

[ 
{"BestellungID":"1","KundeID":"1","Anrede":"Herr"}, 
{"BestellungID":"2","KundeID":"2","Anrede":"Herr"}, 
{"BestellungID":"3","KundeID":"3","Anrede":"Herr"} 
] 

가 어떻게 모든 요소와 모든 주문을 디코딩 할 수 있습니까? 출력은 json으로 인코딩 된 배열로부터입니다.

답변

2

당신은 json_decode

$array = json_decode($json, true); 
+0

감사를 사용할 수 있습니다! 그렇게 쉽게 생각하지 마 :) – Patrick