Changes

Jump to: navigation, search

An Introduction to PHP Variables

529 bytes added, 14:26, 25 May 2007
Assigning a Value to a PHP Variable
== Assigning a Value to a PHP Variable ==
 
Values are assigned to variables using the PHp ''assigmnet operator''. The assigment operator is represented by the ''='' sign. To assigna value to a variable therefore, the variable name is place 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 line sof PHP code, is termininated with a semi-colon (;). Let's assign the word "Circle" to a variable named myShape:
 
<pre>
$myShape = "Circle";
</pre>

Navigation menu