<?php
const COMMA = ',';
const EMPTYSTR = '';
const NEWLINE_CHAR = '\n';
const ENDL = "\n";
$data = '1,2,3,\n,4,5,6,\n,7,8,9';
$strNumsEtc = str_replace( COMMA, EMPTYSTR, $data);
$strArr = explode(NEWLINE_CHAR,$strNumsEtc);
foreach ($strArr as $str) {
echo $str,ENDL;
}
$nl = '';
eval('$nl = "\"" . NEWLINE_CHAR . "\""');
echo 'Shon',$nl;
preferences:
57.56 ms | 402 KiB | 5 Q