Changes

Jump to: navigation, search

An Introduction to PHP Variables

345 bytes added, 14:32, 25 May 2007
Assigning a Value to a PHP Variable
$myShape = "Circle";
</pre>
 
We have now declared a variable with the name ''myShape'' and assigned a string value to it of "Apple". We can similarly declare a variable to contain an integer value:
 
<pre>
$numberOfShapes = 6;
</pre>
 
The above assigment creates a variable named ''numberOfShapes'' and assigns it a numeric value of 6.
 
== Accessing PHP Variable Values ==

Navigation menu