Skip to content

Instantly share code, notes, and snippets.

@nikcub

nikcub/test.php

Created Nov 27, 2014
Embed
What would you like to do?
$ids = array_map('trim', $_POST['ids']);
$ids = array_map('intval', $ids);
$ids = implode(',', array_values($ids));
$db->query("SELECT * from table where id IN(" . $ids . ")");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment