str_replace("\r\n","</br>",$testo_dal_db);

oppure

str_replace("\n","</br>",$testo_dal_db);

Dovrebbe andare.