codice:
$stringa = "Ciao...\ncome\nva?";

$stringa = str_replace("\n", "
\n", $stringa);

printf("%s", $stringa);
Output:
codice:
Ciao...
come
va?