Solve problem 21 using PHP.