<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[PunBB Forums — Improvement to pun_linebreaks]]></title>
		<link>https://punbb.informer.com/forums/topic/20986/improvement-to-punlinebreaks/</link>
		<atom:link href="https://punbb.informer.com/forums/feed/rss/topic/20986/" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Improvement to pun_linebreaks.]]></description>
		<lastBuildDate>Thu, 29 Jan 2009 08:18:11 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Improvement to pun_linebreaks]]></title>
			<link>https://punbb.informer.com/forums/post/123723/#p123723</link>
			<description><![CDATA[<p>Before:</p><div class="codebox"><pre><code>//
// Convert \r\n and \r to \n
//
function pun_linebreaks($str)
{
    return str_replace(&quot;\r&quot;, &quot;\n&quot;, str_replace(&quot;\r\n&quot;, &quot;\n&quot;, $str));
}</code></pre></div><p>After:</p><div class="codebox"><pre><code>//
// Convert \r\n and \r to \n
//
function pun_linebreaks($str)
{
    return str_replace(array(&quot;\r\n&quot;, &quot;\r&quot;), &quot;\n&quot;, $str);
}</code></pre></div><br /><p>Hope this helps. <img src="https://punbb.informer.com/forums/img/smilies/tongue.png" width="15" height="15" alt="tongue" /></p><p>Edit: PHP 4.0.5 required to do the array(), so it might be a problem. <img src="https://punbb.informer.com/forums/img/smilies/hmm.png" width="15" height="15" alt="hmm" /></p>]]></description>
			<author><![CDATA[null@example.com (zachera)]]></author>
			<pubDate>Thu, 29 Jan 2009 08:18:11 +0000</pubDate>
			<guid>https://punbb.informer.com/forums/post/123723/#p123723</guid>
		</item>
	</channel>
</rss>
