: This article mainly introduces the conversion from PHPArray to Javascript. For more information about PHP tutorials, see.
Great programmers start with a set of pages.
1. conversion from PHP Array to Javascript Array
PHP Array-> php json-> transmission-> Javascript String-> Javascript Array
2. PHP Array to JSON
$ Qps_data = array ('000000' => array ('x' => '000000', 'y' => '16 '), '000000' => array ('x' => '000000', 'y' => '16'); echo json_encode ($ qps_data );
Result:
{"1440743647000": {"x": "1440743647000", "y": "16 "}}
3. Javascript JSON to Array
Jquery receives JSON strings
ArrayObj = eval (json_string); console. log (arrayObj );
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.
The above describes the conversion from PHP Array to Javascript, including some content. I hope my friends who are interested in PHP tutorials can help me.