Thursday, February 26, 2009

Most important Rules for PHP Variables

  Kaushal Patel       Thursday, February 26, 2009

Here are some most important rules to remember before declaring PHP Variables.

  • A PHP Variable must start with a letter (A-Z, a-z) or underscore (_).

  • It can only contain alpha-numeric characters (A-Z, a-z, 0-9) and underscore (_).

  • PHP Variable name should not contain spaces. If it contains more than one word then it will be separated by underscore ($emp_salary) or capitalization ($empSalary)

  • PHP Variable name can be any length.

  • PHP Variable are case sensitive. Means Uppercase letter PHP Variables are and lowercase Letter PHP Variables are not the same. For example. $stdname and $stdName are not the same Variable.


logoblog

Thanks for reading Most important Rules for PHP Variables

Previous
« Prev Post

No comments:

Post a Comment