It gets even better. Take a look at the form fields starting on line 46. No need for CGP.pm or any special decoding. A quick look at PHP functions, and we'll get into this section's code. PHP function names are case insensitive but must include parentheses, even if the argument list is empty.
Variables defined within a function are by definition local to the function.
Unlike Perl, global variables are not within the scope of a function unless explicitly declared with the global keyword as on line 18. Another PHP keyword, static , indicates a variable should retain its value between function invocations. The example in a nutshell PHP documents can switch back and forth between HTML and PHP as often as your logic dictates. However, a PHP document always begins in HTML mode unless explicitly stated to the contrary. Good programming employs a decomposition methodology.