Posted By

JuliaKM on 10/29/07


Tagged

php textmate array String


Versions (?)

Who likes this?

3 people have marked this snippet as a favorite

basicmagic
vali29
heinz1959


Check if string


 / Published in: PHP
 

  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  

You need to login to post a comment.