我有两个这样的数组:
数组 1 的 x 轴值在数组中 y 轴值在数组中
x-array: ["04 Feb","05 Feb","06 Feb","07 Feb","08 Feb","09 Feb","10 Feb"]
y-array: [3.27,3.34,3.27,3.2,3.28,3.17,3.15]
Array2 在数组中具有 x 轴值 y 轴值在数组中
x-array2: ["11 Feb", "12 Feb"]
y-array2: [3.19, 3.36]
如何使用键值对创建多维数组。
就像下面的php
Array
(
[0] => Array
(
[x-axis] => Array
(
[0] => 04 Feb
[1] => 05 Feb
[2] => 06 Feb
[3] => 07 Feb
[4] => 08 Feb
[5] => 09 Feb
[6] => 10 Feb
)
[y-axis] => Array
(
[0] => 3.27
[1] => 3.34
[2] => 3.27
[3] => 3.2
[4] => 3.28
[5] => 3.17
[6] => 3.15
)
)
[1] => Array
(
[x-axis] => Array
(
[0] => 11 Feb
[1] => 12 Feb
)
[y-axis] => Array
(
[0] => 3.19
[1] => 3.36
)
)
)