floridaflatlander Posted July 25, 2013 Share Posted July 25, 2013 In the elseif below if the $group_num is in the $dont_print I don't want add the info, what am I doing wrong $dont_print = array(0, 12); foreach ($group_array as $key => $group_num) { if (!$add_on_sql) {$add_on_sql = 'WHERE id_group = '.$group_num.'';} elseif (in_array($group_num, $dont_print, FALSE)) {$add_on_sql .= ' OR id_group = '.$group_num.'';} } Thanks Quote Link to comment Share on other sites More sharing options...
Muddy_Funster Posted July 25, 2013 Share Posted July 25, 2013 try elseif (!in_array($group_num, $dont_print)) {$add_on_sql .= ' OR id_group = '.$group_num.'';} Quote Link to comment Share on other sites More sharing options...
Solution floridaflatlander Posted July 25, 2013 Author Solution Share Posted July 25, 2013 (edited) Okay I printed $q and found the problem, 12 the number I didn't want was first up in the loop and address in the if() not the elseif() Sorry about that Muddy_Funster and thanks Edited July 25, 2013 by floridaflatlander Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.