Process CSV Into Array With Column Headings For Key

后端 未结 9 2519
星月不相逢
星月不相逢 2020-11-29 03:35

I have a CSV with the first row containing the field names. Example data is...

\"Make\",\"Model\",\"Note\"
\"Chevy\",\"1500\",\"loaded\"
\"Chevy\",\"2500\",         


        
9条回答
  •  半阙折子戏
    2020-11-29 03:54

    The array_combine() function only works if header colums match the data colums otherwise an error is thrown.

提交回复
热议问题