34,333
edits
Changes
→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 ==