我有'N'个单维数组(其中N表示由sql命令检索到的记录数) 如何将其转换为多维数组,其中键为索引? 起初我还以为创建一个单独的密钥数组,然后将其与这N个阵列相结合的将多个单维数组转换为单个多维数组php
我的输出
Array ([0] => PONDICHERRY [1] => 31-Jan-2018 [2] => [3] => distance and height are not proportional.)
Array ([0] => PONDICHERRY [1] => 03-Feb-2020 [2] => [3] => helloooooooooooooo)
我的预期输出
Array ([0] => Array ([0] => PONDICHERRY [1] => 31-Jan-2018 [2] => [3] => distance and height are not proportional.) [1] =>Array ([0] => PONDICHERRY [1] => 03-Feb-2020 [2] => [3] => helloooooooooooooo) )
这是我很难给阵列组合,但我如何创建这样的?
谢谢
两个不同的阵列不是使用$改编[] = array_merge – devpro