Changes

Jump to: navigation, search

An Introduction to PHP Variables

1 byte added, 20:16, 17 November 2008
Assigning a Value to a PHP Variable
== Assigning a Value to a PHP Variable ==
Values are assigned to variables using the PHP ''assignment operator''. The assigment assignment operator is represented by the ''='' sign. To assign a value to a variable therefore, the variable name is placed on the left of the expression, followed by the assignment operator. The value to be assigned is then placed to the right of the assigment operator. Finally the line, as with all PHP code statements, is termininated with a semi-colon (;).
Let's begin by assigning the word "Circle" to a variable named myShape:

Navigation menu