fputcsv Gives Warning When Handling Final Element of an Array
<p>My question is about how to properly handle the following warning:</p>

<pre><code>Warning: fputcsv() expects parameter 2 to be array, boolean given
</code></pre>

<p>The offending lines are:</p>

<pre><code>foreach($participantInfo as $fields)
{
    fputcsv($participantFile, $fields);
}
</code></pre>

<p>When I did a var_dump on <code>$fields</code>, I found two arrays as expected, but also a final <code>bool(false)</code>. Other than this, the code works as expected. Is there an appropriate way to handle the final bool, or should I just suppress the function warnings?</p>
