Proper Way To Name Variables

RegisterLogin
Proper Way To Name Variables
Post Description: i am new to php programming i took some c+ programming classes when i was in college but i forgot all that stuff
Tags: proper, way, to, name, variables
This Post Was Posted On Mar 29, 2010 By Clevermet #3300
i am new to php programming i took some c+ programming classes when i was in college but i forgot all that stuff
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
webune
#3656 1
there are several ways to declare a variable, lets say we have a variable with two words:

for example: Page Color

rule of thumb:
* Cannot use spaces,tabs (white spaces)
* Cannot use special characters (example #$%^*)

so these are some good ways to declare our variable:

page_color
page-color
PageColor

Bad ways:
pagecolor
page color
PAGECOLOR

Mar 29, 2010 Reply Report abuse
©2011 Webune Forums - Sun Dec 18, 2011 9:43 pm
Powered by: Webune Forums V3