<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Nisi's work blog &#187; new line</title>
	<atom:link href="http://wiki.nisi.ro/tag/new-line/feed/" rel="self" type="application/rss+xml" />
	<link>http://wiki.nisi.ro</link>
	<description>Nisi's work blog - programing tips</description>
	<lastBuildDate>Mon, 21 Nov 2011 08:43:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>New Line in PHP</title>
		<link>http://wiki.nisi.ro/2010/03/new-line-in-php/</link>
		<comments>http://wiki.nisi.ro/2010/03/new-line-in-php/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 19:52:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP & MySQL]]></category>
		<category><![CDATA[cvs]]></category>
		<category><![CDATA[new line]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://wiki.nisi.ro/?p=222</guid>
		<description><![CDATA[Printing a new line witch is visible in a web page is made like this: echo&#40;&#8216;line 1&#8242;.&#8216;\n&#8216;.&#8216;line 2&#8242;&#41;; &#160; the code above will print line 1 on a line and line 2 on a new line. Now if you have to generate a CSV file  &#60;br/&#62; wil not work  you have to use  \n like [...]]]></description>
			<content:encoded><![CDATA[<p>Printing a new line witch is visible in a web page is made like this:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><a href="http://www.php.net/echo"><span class="kw3">echo</span></a><span class="br0">&#40;</span><span class="st0">&#8216;line 1&#8242;</span>.<span class="st0">&#8216;<span class="es0">\n</span>&#8216;</span>.<span class="st0">&#8216;line 2&#8242;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
</ol>
</div>
<p>the code above will print line 1 on a line and line 2 on a new line.</p>
<p>Now if you have to generate a CSV file  &lt;br/&gt; wil not work  you have to use  \n like in C language but there is a trick.</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><a href="http://www.php.net/echo"><span class="kw3">echo</span></a> <span class="br0">&#40;</span><span class="st0">&#8216;line 1 <span class="es0">\n</span> line 2&#8242;</span><span class="br0">&#41;</span>; <span class="co1">//will print something like    line 1 \n line 2</span></div>
</li>
<li class="li1">
<div class="de1"><a href="http://www.php.net/echo"><span class="kw3">echo</span></a><span class="br0">&#40;</span><span class="st0">&quot;line 2 <span class="es0">\n</span> line 2&quot;</span><span class="br0">&#41;</span>;  <span class="co1">// will print line 1 on the first line and line 2 on the second line</span></div>
</li>
</ol>
</div>
<p>double quotes will parse \n as a new line and single quotes will believe is is a text</p>
]]></content:encoded>
			<wfw:commentRss>http://wiki.nisi.ro/2010/03/new-line-in-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

