Bug #16966 » 0004957.patch
t3lib/class.t3lib_div.php (Arbeitskopie) | ||
---|---|---|
function csvValues($row,$delim=',',$quote='"') {
|
||
reset($row);
|
||
$out=array();
|
||
while(list(,$value)=each($row)) {
|
||
list($valPart) = explode(chr(10),$value);
|
||
$valPart = trim($valPart);
|
||
$out[]=str_replace($quote,$quote.$quote,$valPart);
|
||
foreach ($row as $value) {
|
||
$value = trim($value);
|
||
$out[]=str_replace($quote,$quote.$quote,$value);
|
||
}
|
||
$str = $quote.implode($quote.$delim.$quote,$out).$quote;
|
||
return $str;
|