What is PHP?

I really don’t want to get too much into what PHP is on this POST. I’d rather just get to the code as I’m writing this for people who have coding expierience. For thos who require the information you can click here to visit the WikiPedia Article on PHP.
Ok here is lesson one, this will be the most basic of lessons, covering what I tend to see as the basics. When coding in PHP you must always start the document with:
<?PHP ?>
Once you have done this, to output a message to the screen you simple do the following :
<?PHP
$foo = "bar";
echo("Your message here");
echo $foo;
echo "hello";
echo "hello " . $foo;
echo "hello " . $foo . ", how are you?";
?>
Hopefully you understand how to output information with PHP now. There are plenty of in depth tutorials on this if you want to see them. This is aimed at people who understand programming.
Basic Variables
You can set variables easily in PHP, you don’t really need a type declaration in PHP. You just do the following :
<?PHP
$foo = 1;
$foo = "bar":
$foo = $bar;
$foo = substr("hello", 0, 2) . "...";
$foo += 2;
last one(starts at letter 0(h) and trims to letter 2(l) and then adds 3 dots to the end … so the output would be hel…
?>
Ok this concludes the first php lesson, they are aimed to be quick tutorials so you see the code more than the background.
References..

Get It Today!




