<?php
$myFile = "myfile.txt";
$fh = fopen($myFile, 'rt');
$theData = fread($fh, filesize($myFile));
$aDoor = $_GET['idno'];
echo $aDoor;
$theData = preg_replace('/\n?.*$aDoor.*$/m', '', $theData);
fwrite($fh, $theData);
fclose($fh);
echo $theData;
?>
preg_replace('/\n ?. SOMETEXT. $/m', '', $theData); それは働いています
$aDoor 文字列の使用方法