How to add PHP array to JS array in Highcharts

前端 未结 5 586
耶瑟儿~
耶瑟儿~ 2020-12-20 09:22

All I want is to be able to add this simple PHP array to display in the X axis. It\'s not wanting to display my content at all and I\'m not understanding why.



        
5条回答
  •  一整个雨季
    2020-12-20 09:57

    it worked with me like this:

    for categories :

    categories: [],
    

    for data:

    data: []
    

    Note that $name is a string array and $age is an integer array. Also keep in mind that this code worked with me when I imbedded the php,Sql query in the same page.

提交回复
热议问题