あなたの文字列の場合:
2011.11.12 20:06,Teac Ous,Solid Pyroxeres,46521,Pyroxeres
2011.11.12 20:06,Teac Ous,Solid Pyroxeres,46521,Pyroxeres
2011.11.12 20:06,Teac Ous,Solid Pyroxeres,46521,Pyroxeres
2011.11.12 20:06,Teac Ous,Solid Pyroxeres,46521,Pyroxeres
2011.11.12 20:06,Teac Ous,Solid Pyroxeres,46521,Pyroxeres
2011.11.12 20:06,Teac Ous,Solid Pyroxeres,46521,Pyroxeres
そして、あなたはあなただけはstrtrを使用することができ初めと各行の末尾に二重引用符が必要になります。
$sLines = "2011.11.12 20:06,Teac Ous,Solid Pyroxeres,46521,Pyroxeres
2011.11.12 20:06,Teac Ous,Solid Pyroxeres,46521,Pyroxeres
2011.11.12 20:06,Teac Ous,Solid Pyroxeres,46521,Pyroxeres
2011.11.12 20:06,Teac Ous,Solid Pyroxeres,46521,Pyroxeres
2011.11.12 20:06,Teac Ous,Solid Pyroxeres,46521,Pyroxeres
2011.11.12 20:06,Teac Ous,Solid Pyroxeres,46521,Pyroxeres";
$arrTr = array();
$arrTr1 = array();
$arrTr[chr(13)] = '"'.chr(13).'"';
$arrTr1["\"\n"] = '"';
$sLines = strtr(strtr($sLines,$arrTr),$arrTr1);
$sLines = '"'.$sLines.'"';
echo '<pre>';
print_r($sLines);
echo '</pre>';
しかし、あなたの場合行を "\ n"文字で貼り付けてください。
$sLines = "2011.11.12 20:06,Teac Ous,Solid Pyroxeres,46521,Pyroxeres\n2011.11.12 20:06,Teac Ous,Solid Pyroxeres,46521,Pyroxeres\n2011.11.12 20:06,Teac Ous,Solid Pyroxeres,46521,Pyroxeres\n2011.11.12 20:06,Teac Ous,Solid Pyroxeres,46521,Pyroxeres\n2011.11.12 20:06,Teac Ous,Solid Pyroxeres,46521,Pyroxeres\n2011.11.12 20:06,Teac Ous,Solid Pyroxeres,46521,Pyroxeres";
$arrTr = array();
$arrTr1 = array();
$arrTr["\n"] = '"'."\n".'"';
$sLines = strtr($sLines,$arrTr);
$sLines = '"'.$sLines.'"';
echo '<pre>';
print_r($sLines);
echo '</pre>';
このサイトはあなたに役立つかもしれません... Rad Software正規表現デザイナー - http://www.radsoftware.com.au(正規表現をテストするツール) – Bryan