HonkBlog|TechNotes

Notes, fixes, tips and suggestions from across my technical world

PHP new line not showing in text

 PHP  No Responses »
Nov 232009
 

Note to self whenever you are experiencing problems with rendering new lines in php e.g. using \n you must wrap these in double quotes not single e.g.

This will NOT work

echo ='My line with a line feed \n';

This WILL work

echo ="My line with a line feed \n";
 Posted by Simon Potter at 10:47 am  Tagged with: formatting, linefeed, notetoself, PHP

Tags

.htaccess 1.2 Active Server Pages advice anatomy annoyances ASP Cake PHP Coldfusion connect defragment doh dynamic evernote facebook fbml feed fixes formatting fql frenchconnections howto ideas IIS Internet Information Services languages Learning Curve life hacking linefeed logout mptt msoffice mysites notetoself notworking PHP Quickstart robots.txt rss snagit tips Transition video whitespace xml

Recent comments

  • Windows could not start the IIS Admin Service on Local Computer ……… 2146893818 ……. SharePoint – My SharePoint Blog on How to restore a corrupt MetaBase.xml
  • XAMPP – Port 80 in use by “Unable to open process” with PID 4! 12 – QuestionFocus on Windows 7: PID 4 listening to port 8 – Apache cannot start
  • Moh on Error: The requested address “/” was not found on this server – CakePHP Error
  • James on Windows 7: PID 4 listening to port 8 – Apache cannot start
  • Bart on Windows 7: PID 4 listening to port 8 – Apache cannot start

Me on twitter

Tweets by @_simonpotter
car rentals maui
© 2014 HonkBlog|TechNotes Suffusion theme by Sayontan Sinha