PHP код в одну строку
1 2 3 4 5 6 7 |
function oneLine($string) { $string = str_replace(["\r", "\n", "\t"], null, $string); $string = mb_ereg_replace('[\s]+', ' ', $string); $string = trim($string); return $string; } |
1 2 3 4 5 6 7 |
function oneLine($string) { $string = str_replace(["\r", "\n", "\t"], null, $string); $string = mb_ereg_replace('[\s]+', ' ', $string); $string = trim($string); return $string; } |