Re: [PHP] Nested foreach statement

2006-08-03 Thread Richard Lynch
It will probably work, and you could find out for sure by just trying it. It might be better to construct a single query using things like: $company_ids = implode(', ', $_POST['reporton_company']); $query .= " WHERE company_id IN ($company_ids) "; This presumes you have already validated the com

Re: [PHP] Nested foreach statement

2006-07-31 Thread chris smith
foreach($_POST['reporton_company'] as $cmp_ind =>$arrayd_cmp_id) { foreach($_POST['report_period'] as $rep_ind =>$arrayd_per_id) { foreach($_POST['questions_groups'] as $group_ind => $arrayd_group_no) { mysql_select_db($database_name, $dname); Why