PHP CSV to Associative Array with Row Headings

前端 未结 3 676
我寻月下人不归
我寻月下人不归 2021-01-29 06:43

I have a CSV file with headings in both the columns and rows that i need as an associative array and the examples i have tried on SO haven\'t worked for me.

The closest

3条回答
  •  情歌与酒
    2021-01-29 06:59

    Try this,

    foreach ($all_rows as $key => $value) {
      echo $value['food'] . "\n";
      echo $value['In_Stock'] . "\n"
    
    }
    

提交回复
热议问题