我有一个名为 如何将这些数据插入到mysql数据库表中 这些 p>
我无法从给定数组中分别获取这些值,因为它们的索引不是按顺序排列的。 p>
div> $ output code>的数组,其中包含: p>
\ n
Array
(
[0] =>数组
(
[0] => J Arora
[1] =>印度
)
[ 1] =>数组
(
[0] => J Ramuj
[2] =>俄罗斯
)
[2] =>数组
(
[1] => KJ Tris
[2] =>德国
)
)
code> pre>
---------------
name | country
------- | ---------
J Arora | India
------- | --------
J Ramuj | Russia
------- | --------
KJ Tris |德国
------- | --------
code> pre> \ n
I have an array called $output
which contains:
Array
(
[0] => Array
(
[0] => J Arora
[1] => India
)
[1] => Array
(
[0] => J Ramuj
[2] => Russia
)
[2] => Array
(
[1] => KJ Tris
[2] => Germany
)
)
How can i insert these data into mysql database table like these
---------------
name | country
-------|---------
J Arora|India
-------|--------
J Ramuj|Russia
-------|--------
KJ Tris|Germany
-------|--------
I am not able to fetch these values separately from given array as their index are not in sequence.