1 for ($i=1; $i<=1000;$i++) { 2 $id = '100'; 3 $username = 'xm'; 4 $sql[] = '('.$id.',"'.$username.'")'; 5 } 6 mysql_query('insert into tb_user(id,username) values '.implode(',',$sql));