<?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>muhammad yamin dg tola&#187; line breaks</title>
	<atom:link href="http://muhyamin.com/tag/line-breaks/feed/" rel="self" type="application/rss+xml" />
	<link>http://muhyamin.com</link>
	<description>php...mysql...css...html...ubuntu...m$win...pns...etc...etc...</description>
	<lastBuildDate>Wed, 30 Jun 2010 07:11:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Manipulating Strings: Using Line Breaks</title>
		<link>http://muhyamin.com/2009/12/10/manipulating-strings-using-line-breaks/</link>
		<comments>http://muhyamin.com/2009/12/10/manipulating-strings-using-line-breaks/#comments</comments>
		<pubDate>Thu, 10 Dec 2009 19:54:55 +0000</pubDate>
		<dc:creator>dgtola</dc:creator>
				<category><![CDATA[phpMySQL]]></category>
		<category><![CDATA[line breaks]]></category>
		<category><![CDATA[strings]]></category>

		<guid isPermaLink="false">http://muhyamin.com/?p=532</guid>
		<description><![CDATA[How can a line break be used within HTML? That&#8217;s easy: with the &#60;br /&#62; HTML element. However, what if there is data with \n or \r\n line breaks? Search and replace comes to mind; however, it is much easier to use a built-in PHP function: nl2br(). This parses a string and converts all line [...]]]></description>
			<content:encoded><![CDATA[<p>How can a line break be used within HTML? That&#8217;s easy: with the <tt>&lt;br /&gt;</tt> HTML element. However, what if there is data with <tt>\n</tt> or <tt>\r\n</tt> line breaks? Search and replace comes to mind; however, it is much easier to use a built-in PHP function: <tt>nl2br()</tt>. This parses a string and converts all line breaks to <tt>&lt;br /&gt;</tt> elements, as the preceding script shows.</p>
<h5><strong>Adding &lt;br /&gt; Elements at Every Line Break (nl2br.php)</strong></h5>
<pre>&lt;?php
  $input = "One\nTwo\r\nThree"; 
  echo nl2br($input);
?&gt;</pre>
<p>Outputs the HTML:</p>
<pre>One&lt;br /&gt;
Two&lt;br /&gt;
Three</pre>
<p>As you can see, the line breaks are still there, but the <tt>&lt;br /&gt;</tt> elements were added.</p>
<p class="facebook"><a href="http://www.facebook.com/share.php?u=http://muhyamin.com/2009/12/10/manipulating-strings-using-line-breaks/" target="_blank"><img src="http://muhyamin.com/wp-content/plugins/add-to-facebook-plugin/facebook_share_icon.gif" alt="Share on Facebook" title="Share on Facebook" /></a></p>]]></content:encoded>
			<wfw:commentRss>http://muhyamin.com/2009/12/10/manipulating-strings-using-line-breaks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
