insert multi value on one field on table by chekbox input type
<p>how can insert multi value on one field on table by chekbox input type, i use this code </p>

<pre><code>&lt;?
function generate_input_checkbox($name,$content)
{
    if(is_array($content))
    {
        if(sizeof($content))
        {
            foreach($content AS $key =&gt; $value)
            {
                $i = $key + 1;
                $boxreturned .= "&lt;div&gt;&lt;label for=\"".$name."_$i\"&gt;".
                    "&lt;input type=\"checkbox\" name=\"".$name."[]\" ".
                    "value=\"$i\" id=\"".$name."_$i\" /&gt;$value&lt;/label&gt;&lt;/div&gt;\n";
            }
        }
    }
    return $boxreturned;
}

$work = generate_input_checkbox('work',
    array('السبت','الاحد','الاثنين','الثلاثاء','الاربعاء','الخميس','الجمعة'));
echo $work;

if(is_array($_POST['work']))
{
    foreach ($_POST['work'] AS $worked)
    {
        $userwork .= $worked.',';
    }
}
?&gt;
</code></pre>

<p>its save on field (array) and not save the value why!!</p>
