PHP return nothing if array_column fields are blank
<p>The below code takes an array, <code>$array</code>, and an array key, <code>$item</code> and implodes by adding a comma to each item.  How can I alter it so that if the value of the item inside the array is null, then the implode will not add a blank comma.</p>

<pre><code>public static function implode($array, $item) 
{
    return implode(',', array_column($array, $item));
}
</code></pre>

<p>For example:</p>

<pre><code>$array = [
    ['eri_number' =&gt; ''],
    ['eri_number' =&gt; '222']
    ['eri_number' =&gt; '']
];
$item = 'eri_number';
$myClass-&gt;implode($array, $item);
</code></pre>

<p>The above code will output;</p>

<pre><code>,222,
</code></pre>

<p>I just want it to output <code>222</code> without the other blank values.</p>

<p>Can anyone help?</p>