solved hamm problem in PHP