RCRAMER.COM
Clever website slogan
Home > Tech > PHP > Variables

Variables in PHP

variables are start with the $ symbol and are defined with the equals (=) sign.

$var_name = value; $txt="Hello World!"; $x=16;
  • A variable must start with a letter (a-z,A-Z) or an underscore (_).
  • A variable name can only contain apla-numeric charactes and underscores (a-z,A-Z,0-9 and _)
  • A variable name can contain no spaces - use an underscore(_).

Table of Contents

String Manipulation
Numbers
Arrays
Environment Variables
Variable Information Functions

Also see Tests:
Comparison Operators
Variable Test Functions
Pattern Matching

Also see settype() and unset()