solved problem 10 with PHP