PHP array into Javascript Array

前端 未结 4 615
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-23 23:32

Afternoon all. The code below works perfectly, however, I need to pull each row of the php sql array out and into the script var. Any ideas on how to write a while loop that cou

4条回答
  •  野性不改
    2021-01-24 00:18

    You can get the rows using mysqli_fetch_assoc and then encode it to JSON:

    
    
    
    var enableDays = ;
    

提交回复
热议问题