select values from mysql using php array of ids
snippet in php

select values from mysql using php array of ids

user3722

$sql = 'SELECT * 
          FROM `table` 
         WHERE `id` IN (' . implode(',', array_map('intval', $array)) . ')';