Let us see how javascript, php, and ruby display the content of textarea with line breaks
Javascript:
document.getElemnetById(‘textareacontent’).value.replace(/\n/g,’<br>’);
PHP:
preg_replace(“/\n/”,”<br>”,$_REQUEST['t1']);
Ruby:
(teaxtareacontent).gsub(/\n/,”<br>”)
