fork download
  1. <?php
  2. $values = array('Foo' =>'Foo' ,'Bar' =>'Bar' );
  3. $separated = "'" . implode("','", $values)."'";
  4. $sql = 'SELECT NAME,AGE FROM CATS WHERE TITLE IN(' .$separated.')' ;
  5.  
  6. print_r($sql);
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
     SELECT NAME,AGE FROM CATS WHERE TITLE IN('Foo','Bar')