I have table which contains different permissions. Currently i am render all those permsion columns into check boxes manually. Like this

```
global $con;
    $sql = "SELECT * FROM `permissionsinpage` where `ETPK` = $id"; //chk allow  project name
    $result = mysql_query($sql,$con) or die(mysql_error());
    $no_result = mysql_num_rows($result); // total rows

    echo "ID,Name,Switch,MembersList, Self Category List, Allow Projects,Verify Proj,WhiteBoard,Chk Emp Proj Days,
    Chk Proj Days,Permissions,Main Menu,WhiteBoard_EmpDetail,Entry_WhiteBoard,Proj_StatusEdit,Ger_StatusReport,
    Switch_request, Get Switch Request, Project QuestionAnswer, Allow All Task Finished Request Received, AllowDeadLineInternalView, AllowDeadLineExternalView,
    AllowITComplainsNotInStockPanel, AllowITComplainsPendingOrInprogressPanel, AllowAllITComplainsEdit, AllowEditViewOwnITComplains";
    while($row = mysql_fetch_assoc($result))
    {
        echo "----//------";
        echo $row['ETPK'];echo",";
        $name = GetEmpName($row['ETPK']);
        echo $name;echo",";
        echo '<input type="checkbox" id="switch"';
        if ($row['switch'] == 1)
            echo "checked";
        echo">,";

        echo '<input type="checkbox" id="MemberNames"';
        if ($row['MemberNames'] == 1)
            echo "checked";
        echo">,";

        echo '<input type="checkbox" id="selfCategoryList"';
        if( $row['selfCategoryList'] == 1)
            echo "checked";
        echo">,";

        echo '<input type="checkbox" id="AllowProjects"';
        if ($row['AllowProjects'] == 1)
            echo "checked";
        echo">,";

        echo '<input type="checkbox" id="VerifyAllowProjects"';
        if ($row['VerifyAllowProjects'] ==1)
            echo "checked";
        echo">,";

        echo '<input type="checkbox" id="WhiteBoard"';
        if($row['WhiteBoard'] ==1)
            echo "checked";
        echo">,";

        echo '<input type="checkbox" id="ChkEmpProjDays"';
        if( $row['ChkEmpProjDays'] ==1)
            echo "checked";
        echo">,";

        echo '<input type="checkbox" id="ChkProjDays"';
        if($row['ChkProjDays'] ==1)
            echo "checked";
        echo">,";

        echo '<input type="checkbox" id="permissionPage"';
        if( $row['permissionPage'] == 1)
            echo "checked";
        echo">,";

        echo '<input type="checkbox" id="MainMenuTop"';
        if( $row['MainMenuTop'] == 1)
            echo "checked";
        echo">,";

        echo '<input type="checkbox" id="WhiteBoard_EmpDetail"';
        if( $row['WhiteBoard_EmpDetail'] == 1)
            echo "checked";
        echo">,";

        echo '<input type="checkbox" id="Entry_WhiteBoard"';
        if( $row['Entry_WhiteBoard'] == 1)
            echo "checked";
        echo">,";

        echo '<input type="checkbox" id="Proj_StatusEdit"';
        if( $row['Proj_StatusEdit'] == 1)
            echo "checked";
        echo">,";

        echo '<input type="checkbox" id="Ger_StatusReport"';
        if( $row['Ger_StatusReport'] == 1)
            echo "checked";
        echo">,";

        echo '<input type="checkbox" id="RequestForSwitchEmployee"';
        if( $row['SwitchRequest'] == 1)
            echo "checked";
        echo">,";

        echo '<input type="checkbox" id="GetSwitchRequest"';
        if( $row['GetSwitchRequest'] == 1)
            echo "checked";
        echo">,";

        echo '<input type="checkbox" id="ProjectQuestionAnswer"';
        if( $row['ProjectQuestionAnswer'] == 1)
            echo "checked";
        echo">,";

        echo '<input type="checkbox" id="AllowAllTaskFinishedRequest"';
        if( $row['AllowAllTaskFinishedRequest'] == 1)
            echo "checked";
        echo">,";

        echo '<input type="checkbox" id="AllowDeadLineInternalView"';
        if( $row['AllowDeadLineInternalView'] == 1)
            echo "checked";
        echo">,";

        echo '<input type="checkbox" id="AllowDeadLineExternalView"';
        if( $row['AllowDeadLineExternalView'] == 1)
            echo "checked";
        echo">,";

        echo '<input type="checkbox" id="AllowITComplainsNotInStockPanel"';
        if( $row['AllowITComplainsNotInStockPanel'] == 1)
            echo "checked";
        echo">,";

        echo '<input type="checkbox" id="AllowITComplainsPendingOrInprogressPanel"';
        if( $row['AllowITComplainsPendingOrInprogressPanel'] == 1)
            echo "checked";
        echo">,";

        echo '<input type="checkbox" id="AllowAllITComplainsEdit"';
        if( $row['AllowAllITComplainsEdit'] == 1)
            echo "checked";
        echo">,";

         echo '<input type="checkbox" id="AllowEditViewOwnITComplains"';
        if( $row['AllowEditViewOwnITComplains'] == 1)
            echo "checked";
        echo">";

```

As you can see that i am manully adding even checkbox. Is there anyway to short this code and generate the diesred checked checkbox dynamically.