duanquan1207 2018-07-20 22:03
浏览 23

PHP在csv的每个值的两端添加引号

I am currently attempting to wrap every entry in a csv in quotes for input into an SQL server. currently, I am using this method:

$the_row = str_replace(",", "','", $the_row);
$the_row = "'" . $the_row . "'";

This works great, except it leaves off the final quote at the end of each row. What is the best way to go about fixing this?

  • 写回答

0条回答 默认 最新

    报告相同问题?