Check if string


/ Published in: PHP



Copy this code and paste it in your HTML
  1. if (is_array($types)) {
  2. $wheresql = '(';
  3. $where = array();
  4. foreach ($types as $t) {
  5. $where[] = "n.type LIKE '$t'";
  6. }
  7. $wheresql .= join(" OR ", $where);
  8. $wheresql .= ')';
  9. } else {
  10. $wheresql = "n.type LIKE '$types'";
  11. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.