$arr = file("file.txt", FILE_IGNORE_NEW_LINES);
$var = str_replace(trim($arr[0]), "-", $arr[1]);
echo $arr[0], '<br>';
echo $arr[1], '<br>';
echo $var, '<br>';
$user_id = 2; // id который удаляем
mysql_query("LOCK TABLES table WRITE");
mysql_query("ALTER TABLE table AUTO_INCREMENT = (SELECT max(id) FROM table)");
mysql_query("DELETE FROM table WHERE id = $user_id");
mysql_query("UPDATE table SET id = id-1 WHERE id > $user_id");
mysql_query("UNLOCK TABLES");