I am reading a string from a file and searching a database for that string. The strings dont seem to match even though they look the same. When I compare the two they look identical, but the compare isnt satified and I cant figure out why. I echo each variable to the screen and they look identical. Here is a snippet of the code:

// here I get the text from a file
$x=0;
$handle=fopen($filename,"r");
while (!feof ($handle)) {
$player[$x] = fgets($handle,4096);
echo "player[$x]=$player[$x]<br>" ;
$x++;
} // at this point the $player[30]="max"

//here I get the names from the database
while ($myrow = mysql_fetch_array($result)){
if ($myrow['player']==$player[30]){
echo "Player found in db";
//call a function to update the database with
//info about this player