how to replace in br teg in php code example Example: php replace \n by $var = str_replace(array("\r\n","\n"),'<br>', $var);