Added missing "<?php" lines.

Without the "<?php" lines the whole example won't work and can cause trouble especially for beginners.