hello everybody I'm studying php and mysql and I want to use an array into where clause in sql qurey using this code $user[0]='admin'; $user[1]='John'; $user[2]='Sara'; $user[3]='Muna'; $sql="select * from table1 where 'name' IN $user"; Code (markup): the last line always cause an error. I know the right way is to say : $sql="select * from table1 where 'name' IN ($user[0],$user[1],$user[2],$user[3])"; Code (markup): but this method still not general and not flixable ; thank you