need help getting a percentage from array

Discussion in 'PHP' started by sensoryaddict, Jun 20, 2011.

  1. #1
    Basically I have a select statement that checks the value of 3 checkboxes from a form
    for all records . The possible values are 0 for unchecked or 1 for checked

    $sql = "SELECT
    setup_form,
    application,
    contract
    FROM
    users";

    After I fetch array how can I calculate the % of how many records have all the checkbox fields checked (or 1 in all fields)


    So for example 75% of users have submitted all documents

    Thnks
     
    sensoryaddict, Jun 20, 2011 IP