README.md: fix syntax errors, make valid PHP

The example can now be pasted straight into a php file and run.