A.C.Manikandan A.C.Manikandan - 2 years ago 70
SQL Question

how to add the check box for each values after the comma in php?

I have the following values


How to add the checkbox for each value after the comma.please help me

Answer Source

Use explode() function.

$val = "add,view,edit,delete";
$valArr = explode(",", $val);
foreach($valArr as $name)
    echo "<input type='checkbox' name='type[]' value='".$name."'>".$name." ";
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download