<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[PHP Forums - Comma delimited file]]></title>
		<link>http://phpforums.org/topic28-comma-delimited-file.html</link>
		<description><![CDATA[The most recent posts in Comma delimited file.]]></description>
		<lastBuildDate>Fri, 06 Aug 2010 10:03:11 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Comma delimited file]]></title>
			<link>http://phpforums.org/post75.html#p75</link>
			<description><![CDATA[<p>Hope it helps !!!<br /></p><div class="codebox"><pre><code>&lt;?php
$sContents    =    &quot;Jim,Smith,1234 Main Street,Anytown,NY,12345,206,123-3456\n&quot;;
$sContents    .=    &quot;Aneesh,R,1234 Main Street,Anytown,NY,12345,206,123-3456\n&quot;;
$sContents    .=    &quot;Sambhu,S,1234 Main Street,Anytown,NY,12345,206,123-3456&quot;;

foreach( explode(&quot;\n&quot;, $sContents) as $k=&gt;$sContent ){
    $arrValues    =    explode( &quot;,&quot;, $sContent );
    $arrGlobal[$arrValues[1]][]    =    $arrValues[1] .&quot;,&quot; . $arrValues[0] .&quot;,&quot; . $arrValues[7] ;
}
sort( $arrGlobal );
foreach( $arrGlobal as $Global ){
    echo $Global[0] .&quot;&lt;br&gt;&quot;;
}
?&gt;</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (aneeshrp)]]></author>
			<pubDate>Fri, 06 Aug 2010 10:03:11 +0000</pubDate>
			<guid>http://phpforums.org/post75.html#p75</guid>
		</item>
		<item>
			<title><![CDATA[Comma delimited file]]></title>
			<link>http://phpforums.org/post57.html#p57</link>
			<description><![CDATA[<p>I have a comma delimited text file with several records. A typical record looks like this:</p><p>Jim,Smith,1234 Main Street,Anytown,NY,12345,206,123-3456</p><p>I need to read the file andd then output the data (name and phone number) in a two columm table like this:</p><p>Smith, Jim&nbsp; &nbsp; &nbsp; &nbsp; (206) 123-3456</p><p>The data also needs to be sorted by last name.</p><p>I assume I will be using an array, but I&#039;m not sure how to do it.</p><p>If you can help me, email me at grz@wi-net.com.</p><p>Thanks,</p><p>Andrew</p>]]></description>
			<author><![CDATA[null@example.com (andrewgrz)]]></author>
			<pubDate>Sun, 06 Jun 2010 02:00:09 +0000</pubDate>
			<guid>http://phpforums.org/post57.html#p57</guid>
		</item>
	</channel>
</rss>

