Ok, let me give this a shot....
//this script assumes that you don't want the space before the ~n either
$file = "11111 ~n
22222 ~n
33333 ~n
44444 ~n
55555 ~n";
$file = ereg_replace(" ~n","",$file);
$array = explode("\n",$file);
foreach($array as $value) {
echo $value . "<BR>\n";
}
See how that goes for you....obviously you will need to read the file into $file with something like :
$file = join ('', file ('/path/to/file.txt'));
Of course, you could always read the file in with file also, and then use preg_replace to go through the array and replace the ~n's.....
Matt Wade
codewalkers.com