Passing array values to js

后端 未结 2 422
难免孤独
难免孤独 2021-01-25 13:16

So current setup is as following:

PHP:data.php



        
2条回答
  •  北荒
    北荒 (楼主)
    2021-01-25 13:32

    You can use PHP to create the Javascript in the original page. json_encode() can be used to convert a PHP value to the analogous JS literal.

    
    
    

提交回复
热议问题