When writing PHP you'll end up writing a whole lot of HTML.
Trouble is if you want pure PHP, you'll always have to couch all your HTML code within "". And that's a pain.
So for the most part, you'll probably (unless using variables) mix your PHP and HTML together.
Starting with <? and then ending with ?> allows you to drop portions of PHP code into any html page. And the browser does all the hard work.
The real benefit of PHP is however to be able to cut the amount of code (html) that you have to write for any given scenario. It allows you to do anythning any other computer language can do eg. connect to databases, or count, or store things in variables.
USING
if.. then..
Here's how it works.
if (this is true){We'll do this}
OR
if (this is untrue){We'll do this}
if ($diffdel=="on") {$v="1";}
this is a real world example I have on one of my pages.
I am using the variable $diffdel (which was short for 'different delivery address')to give another variable a value, which I would use later.
From memory, if $v was equal to '0', the normal page was displayed, if ='1', it meant a different page was diaplayed. Not really important, just that a decision was made 'if something was true', then we'll run through some code.
TIP V important: The first set of round brackets are the capitals on the 9 and 0 on the keyboard - the second set (the curly brackets) are the capital versions of [ and ] on your keyboard.
OR
there are a few syptes of 'decision' forks such as switch, while, do, which have various uses. But you can look into these later. For now use 'if(this is true){do this}.