Home >Web Front-end >JS Tutorial >How to pass php array or object to javascript_javascript tips

How to pass php array or object to javascript_javascript tips

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 16:54:501861browse

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:

Copy code The code is as follows: