JSON関数-[http://php.net/manual/zh/ref.json.php 」

624 ワード

Table of Constets
  • json_decode — JSON形式の文字列をエンコードする
  • json_アンコール — 変数をJSON符号化する
  • json_ラスター.error_msg — Returns the error string of the last json_encode()or Json_decode()call
  • json_ラスター.error — 最後に発生したエラーを返します。
    Example菵1 A Jsonencode() の例
    <?php
    $arr = array ('a'=>1,'b'=>2,'c'=>3,'d'=>4,'e'=>5);
    echo json_encode($arr);
    ?>

    {"a":1,"b":2,"c":3,"d":4,"e":5}
    http://php.net/manual/zh/function.json-encode.php