Below is my array I have to convert first value as key and second as value,
Array
(
[0] => Array
(
[region_code] => AB
[region_name] => Alberta
)
)
請提出最佳解決方案。我正在使用數組映射,但它不起作用。php array將一個值作爲關鍵字,第二個作爲值
所以需要的數組是這樣的, $ result_array = array(「AB」=>「Alberta」); – bdevloper