Basic PHP – Assigning Values to Variables
Adding values to php variables is simple as the following examples shows
The example code above will add the value Bobby to the variable $name and 30 to the variable age. You can print the value of the variable out to the browser by using the echo statement as follows.
Further to this we could add this html to a page.
Hi my name is ; and my age is
This will print out Hi my name is Bobby and my age is 30
Related posts:
- Basic PHP – The Hello World Program
- Getting The Last Auto Increment Field With PHP
- Basic Windows Security
- Connecting to MySQL with PHP
