solved problem 18 in php. most annoying array syntax ever.