how to extend the length of time when fgetcsv function of php is reading csv file?
<p>am having a problem here, i read a csv file using fgetcsv function then loop it, and write it into an xml file...when am using the script in a not so big data, everything works perfectly and writes the xml file....but when i use it in a huge csv, the xml can't finished being written and end up in an unclosed token thing</p>

<pre><code>        if (($handle = fopen("C:\\xampp\htdocs\yii\branch\seo_tagsdev.csv", "r")) !== FALSE) {
            while (($data = fgetcsv($handle, 10000000, ",")) !== FALSE) {
                $num = count($data);

                // echo "&lt;p&gt; $num fields in line $row: &lt;br /&gt;&lt;/p&gt;\n";

                $row++;
                for ($c=0; $c &lt; $num; $c++) 
                {
                    $url = $doc-&gt;createElement('url');
                    $root-&gt;appendChild($url);

                    $loc = $doc-&gt;createElement('loc',htmlentities($data[$c]));
                    $url-&gt;appendChild($loc);

                    $lastmod = $doc-&gt;createElement('lastmod',date('Y-m-d'));
                    $url-&gt;appendChild($lastmod);

                    $freq = $doc-&gt;createElement('changefreq','daily');
                    $url-&gt;appendChild($freq);

                    $priority = $doc-&gt;createElement('priority',0.9);
                    $url-&gt;appendChild($priority);
//                  echo $data[$c] . "&lt;br /&gt;\n";

                }
                 $doc-&gt;save("C:\\xampp\htdocs\yii\branch\seo_tagsdev.xml");
            }
</code></pre>

<p>i even adjusted the length parameter of fgetcsv and yet it doesn't work at all</p>
