Import and export

git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@568 7c3ca157-0c34-0410-bff1-cbf682f78f5c
This commit is contained in:
jakubvrana
2009-04-01 10:57:34 +00:00
parent 0f93a490a4
commit f7452add47
3 changed files with 17 additions and 13 deletions

View File

@@ -1,7 +1,7 @@
<?php
function dump_csv($row) {
foreach ($row as $key => $val) {
if (preg_match("~[\"\n,]~", $val)) {
if (preg_match("~[\"\n,]~", $val) || (isset($val) && !strlen($val))) {
$row[$key] = '"' . str_replace('"', '""', $val) . '"';
}
}