Download excel files generated from sql Queries
<p>I have a code snippet like this one here below:</p>

<pre><code>&lt;pre&gt;
&lt;?php
set_time_limit (0);
$files = array('export_ird', 'export_earm',);
foreach($files as $f){
include_once $f.".php";
echo "finished file $f\n";
flush();
}
?&gt;
&lt;/pre&gt;
</code></pre>

<p>Now those two files names in the array are files which contain queries to a postgres database. Each of those queries and is different and when those files are run separately, the query is made and the data got is converted into an excel file and is downloaded. Now using th code snippet above, i intend to loop through the files such that each query is made and converted to excel file which is downloaded on the fly. But instead, its only the first file in the code snippet thats executed and the other file doesnt get excuted. What could be causing this and how can i solve the problem i have at hand which is: i would like to be able to have one php file say export_all.php which calls specified php files such that instead of calling all of them separately, they are called by this one file .</p>
