php programs to solve usual problems