There is an incredible but little known built-in function with PHP that replaces all new line characters within a string with html <br /> tags. Its perfect if you ever want to display the contents of a text area within HTML. $str = nl2br($str); This will replace all new line characters with valid XHTML <br /> tags. There is also an optional parameter to turn of XHTML and just use...
sudo apt-get install apache2 php5 libapache2-mod-php5
Start the service:
sudo service apache2 restart