>>>>> "S" == "K Simon" <[EMAIL PROTECTED]> writes:
> Thx, but could anybody give me an example? It shouldnt be too hard?!
If you feel you have to do it in php then this should work. You'd save
a lot of effort if you used the unix 'cut' command though.
cut -d ' ' -f 1 inputfile.txt > outputfile.txt
is equivalent to (but considerably faster than) this:
<?php
$in_file = fopen( "inputfile.txt", "r" ) or die( "failed to open input file." );
$out_file = fopen( "outputfile.txt", "w" ) or die( "failed to open output file." );
while ( !feof($in_file) ) {
fwrite( $out_file, strtok(fgets($in_file, 1024), " ") . "\n");
}
fclose ($in_file);
fclose ($out_file);
?>
--
Still nothing
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]