foreach ($_POST['ECL'] as $lt) {
//SQL select statements are run. Each $lt is a where condition where results are obtained from the DB.
}
I want to take a count of each result and sum this up. The total would be records obtained. I can get the record count for each individual $lt, but I am unable to sum them. All help would be appreciated.
[update] the number of $lt is not fixed. $lt can be 1,2,3,4… Counter such as $i++ does no work
Try using mysql_num_rows or mssql_num_rows – they return the number of rows in a result