Home > Web Front-end > JS Tutorial > body text

How to pass php array or object to javascript_javascript tips

WBOY
Release: 2016-05-16 16:54:50
Original
1811 people have browsed it

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:

Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template