Thursday, 18 October 2007

PHP

Today we started on PHP : Hypertext Preprocessor



PHP is a powerful server-side scripting language for creating dynamic and interactive websites



Variables in PHP are used to store values, like text,numbers or arrays. A variable which has been stored can be used over and over again.
Variables in PHP start with "$"

- $variable_name = value;

With PHP, a variable doesn't have to be declared as "string" or "int" as PHP can identify what type a variable is when it is called.

---

Variable Naming Rules
  • 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)

No comments: