-1
私は数時間インターネットを検索していますが、私はそれを理解できません。php json_decodeがjson配列で動作していません
<?php
$json = '{"pages":[{"name": "Page1","inputs":[{"title": "Catagory","name": "catagory","type": "radio","options":[{"name": "Paper","value": "paper"}{"name": "Letter","value": "letter"}]}{"title": "Title","name": "title","type": "text"}{"title": "File","name": "file","type": "file","fileName": "?pages[0].inputs[0]"}{"title": "Submit","type": "submit"}]}]}';
$result = json_decode($json, true);
var_dump($result);
echo $result['pages'][0]['name'];
echo $pages[0]['name'];
?>
イム単にいくつかのJSONを解析しようとしているが、ウェブサイトには、これを言う:
NULL
Notice: Undefined variable: pages in C:\Users\hazzj\Desktop\Stuff\Apache-Server\htdocs\WMS\Author\submit\test.php on line 7
JSONが無効です - http://jsonlint.comで確認してください –