O'Reilly logo

Core PHP Programming: Using PHP to Build Dynamic Web Sites by Leon Atkinson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Naming

The names of variables, constants, and functions are to begin with a lowercase letter. In names that consist of more than one word, the words are written together and each word starts with an uppercase letter. Use short names for variables used in a small scope, such as just inside a for loop. Use longer names for variables used in larger scopes.

Function names should begin with a lowercase letter and use capitals for subsequent words.

 /* ** Function getAddressFromEnvironment ** Input: $Prefix - prefix used to generate address form ** Return: array suitable for addressFields */ function getAddressFromEnvironment ($Prefix) { global $AddressInfo; //get list of all address fields //from the AddressInfo array reset ($AddressInfo); while (list ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required