Jump to content

Returning false with in_array


Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/280502-returning-false-with-in_array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.