<?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>SamplePhpCodes.com &#187; read csv file with php</title>
	<atom:link href="http://www.samplephpcodes.com/tag/read-csv-file-with-php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.samplephpcodes.com</link>
	<description>Get PHP Code Help, Sample PHP Scripts,PHP Script Demos</description>
	<lastBuildDate>Mon, 05 Apr 2010 15:39:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>PHP CSV import Script</title>
		<link>http://www.samplephpcodes.com/sample-php-codes/use-full-codes/php-csv-import-script/</link>
		<comments>http://www.samplephpcodes.com/sample-php-codes/use-full-codes/php-csv-import-script/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 06:34:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Useful Codes]]></category>
		<category><![CDATA[comma separated values csv]]></category>
		<category><![CDATA[php csv fgetcsv]]></category>
		<category><![CDATA[php csv import script]]></category>
		<category><![CDATA[php fgetcsv]]></category>
		<category><![CDATA[php import csv]]></category>
		<category><![CDATA[php scripts csv cart]]></category>
		<category><![CDATA[read csv file with php]]></category>

		<guid isPermaLink="false">http://samplephpcodes.com/?p=91</guid>
		<description><![CDATA[This is a simple code sample for reading any type of CSV file&#8230;&#8230; In the first line the CSV file contains the Header information. like as fillows File : test.csv NUMBER,NAME 9895123456, Sharuk 9947123456, Salman The csv file contains the mobile and name of customers.use the following code to read it. &#60;?php $handle = fopen('test.csv', [...]]]></description>
			<content:encoded><![CDATA[<p>This is a simple code sample for reading any type of CSV file&#8230;&#8230;<br />
In the first line the CSV file contains the Header information.<br />
like as fillows</p>
<p>File : test.csv</p>
<pre class="brush: php;">
NUMBER,NAME
9895123456, Sharuk
9947123456, Salman
</pre>
<p>The csv file contains the mobile and name of customers.use the following code to read it.</p>
<pre class="brush: php;">
&lt;?php
$handle = fopen('test.csv', 'r');
if ($handle)
{
    set_time_limit(0);

    //the top line is the field names
    $fields = fgetcsv($handle, 4096, ',');

    //loop through one row at a time
    while (($data = fgetcsv($handle, 4096, ',')) !== FALSE)
    {
        $data = array_combine($fields, $data);

    }

    fclose($handle);
}
?&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.samplephpcodes.com/sample-php-codes/use-full-codes/php-csv-import-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
