-
basically php
A couple of basic syntax things for php:
<?php introduces php into the html and ?> closes it.
echo ” “ is a way of getting the browser to print whatever you put in the brackets.
There are three basic things you can get the browser to print:
- text - i.e. whatever words or numbers (n.b. with numbers you don’t need “”) you want it to say
- variables - in a way these are just like algebra. You name a variable e.g. $variablename = “variable” and later you only need to refer to the name and not the variable (much like let x= in algebra)
- functions - these are complex variables and can be maths formulas. A function is introduced this way: function function_name(argument){body of function e.g. echo “what you want this function to say”}
Posted on April 7, 2009
blog comments powered by Disqus