i have a array which contains then numbers 1,2,3 etc... i want to connect to my mysql database and collect the information from the databse where the id column is = either 1 / 2 / 3 etc...

how would i go about this?

$idlist = array(1, 2, 3);
$ids = implode(", ",$idlist);

$query = mysql_query("Select * from tablename where id in (".$ids.")");

try this one it will help you....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.