Insert just the array key without value
<p>I have the following code in PHP:</p>

<pre><code>$keys = array('a', 'b', 'c');
$data = array();
$data[0] = array_fill_keys($keys,'');
</code></pre>

<p>After some follow-up code, when the array set is empty, it returns:</p>

<pre><code>a,b,c
,,,
</code></pre>

<p>I've slimmed down to the problem is <code>$data[0] = array_fill_keys($keys,'');</code></p>

<p>What can I do to have the result as:</p>

<pre><code>a,b,c
</code></pre>

<p>Thanks.</p>
