requirement description:
get a three-dimensional array from PHP, and now you want to get the data through JQ/JS.
- how do I correctly get an array of
{$layer}
in the page (no need to display)? - JQ/JS gets the data separately?
HTML
<volist name="layer" id="layer">
<php> print_r($layer);</php>
</volist>
print results
Array(
[id] => 2387
[image] => /Public/upload/users/2018/06-01/5b10f39be1305.jpg
[layername] =>
[floorid] => 1
[icon] => Array
(
[0] => Array
(
[posx] => 0.2541
[posy] => 0.3444
[onegoodscategoryid] => 868
[portnum] => 0
[portid] =>
[image] => /Public/upload/category/2018/04-12/5acee8b14f930.png
[iconname] => IC
[name] =>
)
[1] => Array
(
[posx] => 0.684
[posy] => 0.5306
[onegoodscategoryid] => 868
[portnum] => 0
[portid] =>
[image] => /Public/upload/category/2018/04-12/5acee8b14f930.png
[iconname] => IC
[name] =>
)
)
)
Array(
[id] => 2388
[image] => /Public/upload/users/2018/06-01/5b10f3d576921.jpg
[layername] =>
[floorid] => 2
[icon] => Array
(
[0] => Array
(
[posx] => 0.3859
[posy] => 0.474
[onegoodscategoryid] => 950
[portnum] => 0
[portid] =>
[image] => /Public/upload/category/2018/04-17/5ad565ce07a13.png
[iconname] => GS
[name] =>
)
)
)