One more revision that will give you a listing of unique words (no duplicates).
PHP Code:
<?php
$unique_words = array( );
if ( ( $file = file( "file.txt" ) ) !== false )
{
foreach( $file as $line )
{
$words = explode( " ", trim( $line ) );
foreach( $words as $word )
{
$word = ereg_replace( "[^A-Za-z0-9]", "", $word );
if ( strlen( $word ) > 3 )
{
if ( !in_array( $word, $unique_words ) )
{
$unique_words[] = $word;
}
}
}
}
}
foreach( $unique_words as $word )
{
echo $word . "\n";
}
?>
Enjoy. Now that you have WampServer, head over to PHP.net, read the documentation and learn something
