$arr = new Array("1","2","3");$sql = "select * from tab where id>".$arr[0]." and id<>".$arr[2];简单举了个例子