I figured it out! Its a totaly diffrent way but here it is:
$list = "$listdir/$datafile.mbz";
$fp = fopen($list, r);
while($str = fgets($fp,$list)) {
$split = split( "|", $str);
if ($split[1] != $newemail && $split[0] != $name) $dump .= "$split[0]|$split[1]";
}
fclose($fp);
$fp = fopen($list, w);
fputs($fp, $dump);
fclose($fp);
Thanks for your help anyway!