fork download
  1. <?php
  2.  
  3. $array = array(2,3,5);
  4.  
  5. $ids = implode(",", $array);
  6.  
  7. $query = "SELECT * FROM tabela WHERE ID IN ($ids)";
  8.  
  9. echo $query;
Success #stdin #stdout 0.01s 82880KB
stdin
Standard input is empty
stdout
SELECT * FROM tabela WHERE ID IN (2,3,5)