Create JSON object using PHP

前端 未结 5 678
没有蜡笔的小新
没有蜡笔的小新 2020-12-05 00:40

How can I achieve or create this type JSON object using PHP?

{ 
    \"label\": \"Devices per year\",
    \"data\": [
        [1999, 3.0], [2000, 3.9], [200         


        
5条回答
  •  难免孤独
    2020-12-05 01:12

    Try using this

    $arrayDateAndMachine = array(   array("1999","3.0"), 
                                    array("2000","3.9")
                                    );
    

提交回复
热议问题