いくつかのキーを置き換えたいのですが、私の配列は次のとおりです。
Array
(
[0] => Array
(
[0] => test1
[1] => test2
[2] => test3
[3] => test4
[4] => test5
[5] => test6
)
[1] => Array
(
[0] => test7
[1] => test8
[2] => test9
[3] => test10
[4] => test11
[5] => test12
)
)
私の願い:
Array
(
[45] => Array
(
[0] => test1
[1] => test2
[2] => test3
[3] => test4
[4] => test5
[5] => test6
)
[51] => Array
(
[0] => test7
[1] => test8
[2] => test9
[3] => test10
[4] => test11
[5] => test12
)
)
45と51は例です。
どうやってやるの?array_flip()、次にarray_search()を試しましたが、PHPは「STRINGとINTEGERの値しか反転できません!」と言っています。
とにかくありがとう。よろしく