Some PHP solutions to simple problems.