This will work better and it has the file opening/writing stuff Allen forgot.
$fp = fopen($newtextfile, "w");
$oldfile = file($oldtextfile);
foreach ($oldfile as $line) {
list($name,$email,$url,$comments) = split("|", $line);
if ($name != $name_to_remove) {
fwrite($fp,$line);
}
}
fclose($fp);