 <p>You need to change <code>$chk_group[]</code> to <code>$chk_group</code> in your first line.</p> <p>In PHP syntax, <code>$chk_group[] =</code> means push the right had value to an array called <code>$chk_group</code>. Your entire array is being stored to <code>$chk_group[0]</code></p> <p>What you need instead is:</p> <pre><code> $chk_group[] =array( '1' =&gt; 'red', '2' =&gt; 'thi', '3' =&gt; 'aaa', '4' =&gt; 'bbb', '5' =&gt; 'ccc' ); </code></pre>