i have a text file with colors in it. The script only returns true if orange is selected. What in the world am i missing?
$filename="colors.txt";
$words=file($filename);
shuffle($words);
$word=$words[0];
if ( $word == "yellow" ){$pid = '558';}
else if ( $word == "red" ){$pid = '557';}
else if ( $word == "purple" ){$pid = '556';}
else if ( $word == "orange" ){$pid = '555';}
else if ( $word == "green" ){$pid = '554';}
else if ( $word == "brown" ){$pid = '553';}
else if ( $word == "blue" ){$pid = '552';}
else {$pid = 'poop';}
echo $word;
echo $pid;
the text file for colors.txt
red
green
blue
yellow
brown
purple
orange