Your $rand() has 1-20 while you only have 4 if statements. Either add 16 more ifs or change the $rand() to be 1-4.