<?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>NewSourceMedia Blog &#187; break</title>
	<atom:link href="http://newsourcemedia.com/blog/tag/break/feed/" rel="self" type="application/rss+xml" />
	<link>http://newsourcemedia.com/blog</link>
	<description>Focused on Interactive Design, Development and Marketing</description>
	<lastBuildDate>Mon, 07 May 2012 01:26:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Split() by newline and return using PHP</title>
		<link>http://newsourcemedia.com/blog/split-by-newline-and-return-using-php/</link>
		<comments>http://newsourcemedia.com/blog/split-by-newline-and-return-using-php/#comments</comments>
		<pubDate>Sat, 27 Mar 2004 00:22:11 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[break]]></category>
		<category><![CDATA[create]]></category>
		<category><![CDATA[cut]]></category>
		<category><![CDATA[devide]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[split]]></category>
		<category><![CDATA[split text]]></category>
		<category><![CDATA[string]]></category>

		<guid isPermaLink="false">http://newsourcemedia.com/blog/2004/03/26/split-by-newline-and-return-using-php/</guid>
		<description><![CDATA[How to create an array by using the split() function on multiple newlines and returns. Introduction: I was having a problem trying to split a string of multiple lines from an online form using the flowing code: This was producing &#8230; <a href="http://newsourcemedia.com/blog/split-by-newline-and-return-using-php/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[How to create an array by using the split() function on multiple newlines and returns.
<span id="more-203"></span>

Introduction:

I was having a problem trying to split a string of multiple lines from an online form using the flowing code:

<pre lang="php"><?php
   $arry_names = split("\n", $names);
?></pre>


This was producing an unexpected line break. I searched the web to see if anyone had the same problem and found that I needed to check for "returns" (\r) also. So now when I'm splitting data by lines, I use the following code:

<pre lang="php"><?php
   $arry_names = split("", $names);
?></pre>]]></content:encoded>
			<wfw:commentRss>http://newsourcemedia.com/blog/split-by-newline-and-return-using-php/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->
