Search:

Home | Programming | Php


PHP Variable Naming Rules

By: Deceth

While we have much freedom in choosing the names of our variables when writing a program, there are still always a set of rules we must abide by. The following are the PHP variable naming rules which I have taken from w3schools.


  • A variable name must start with a letter or an underscore "_"

  • A variable name can only contain alpha-numeric characters and underscores (a-Z, 0-9, and _ )

  • A variable name should not contain spaces. If a variable name is more than one word, it should be separated with underscore ($my_string), or with capitalization ($myString)

Article Source: http://www.writerdatabase.com

www.w3schools.com/php/php_variables.asp www.webdevnotes.com/php-variable-naming-rules/

Please Rate this Article

 

Not yet Rated

Click the XML Icon Above to Receive PHP Articles Via RSS!

Powered by Article Dashboard