I receive jsons in this format:
{"106371527":[33,22,11,2],"10003989":[3,2,11,3]}
note: 106371527,10003989 users ids
when I use json_decode(), still can't access data because the object keys is int,
how to fix this?
thanks,
You should also be able to access the property by wrapping it in {}
:
$json = '{"106371527":[33,22,11,2],"10003989":[3,2,11,3]}';
$object = json_decode($json);
print_r($object->{106371527});
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다