how to Create Json in Php

前端 未结 3 740
猫巷女王i
猫巷女王i 2021-01-29 17:16

How to Create Json Like This In Php?

[
 [
  \"16226281\",
   \"11\",
   \"Disclosure.1994.720p.BluRay.H264.AAC-RARBG\",
   \"finished\"
  ],
  [ 
   \"16226038\"         


        
3条回答
  •  青春惊慌失措
    2021-01-29 17:42

    Here is an example of JSON encoding using the inbuilt json_encode PHP function which can create JSON formatted data from PHP array:

     "value 1",
    'key 2' => "value 2",
    'key 3' => "value 3"
    );
    echo json_encode($arr);
    ?>
    

    Source: How to create JSON formatted text in PHP

提交回复
热议问题