Added PHP solution to problem 1.
Added PHP solution to problem 2. Minor fix to check for data type in problem 1.