Home >Web Front-end >JS Tutorial >How to pass php array or object to javascript_javascript tips
I searched for some methods on the Internet, and finally I adopted the method of using json strings.
Suppose there is a php array $arr, the code is as follows: