Hi and welcome to a basic PHP tutorial.
I'll just go through how to use the "echo" function and how to set up your tags .
Those of you that are familiar with "html" will know that there are html tags to start your page and to end your page.
They're not vital in an html page. As long as you've got an html extension, you're fine.
However, in PHP, you need the tags. This starts and this ends.
That's basically the standard notation for it.
However, our content goes in between here.
Now, I've already saved my file as "helloworld.php".
So, let's save that and have a look in here.
Okay, there's nothing in the page at the moment but we've got our page set up. It's absolutely fine.
The "echo" function works like this: we've got echo, we've got some double quotes and we've got a line terminator which is the semicolon mark.
And our text goes in between here. Let's save that and we'll refresh. And there we go.
Right, you can – and I find this very useful – write your "echo" function like this.
Because when you put an html code inside your echo function these bits here don't represent line breaks. (and just to let you know, if you haven't learnt html yet I suggest you pick it up, at least the basics, because we're going to be using it quite a lot)
For that you need to add your own html in. So '' for line break and then 'New line'.
We'll refresh this and there you go! Our html has been incorporated.
Okay, just to let you know, this is one thing that a lot of people run into: 'image source equals' and your file goes there.
However, at the moment we've got 'echo'.
This shows that we're going to start our output and this here will show that we're ending our output.
We don't end it here; we're going to end it here.
So instead of these, we'll need inverted commas.
Basically, that will let us show our image there.
There's no file specified, but you get the picture.
So, let me just show you what would happen if we keep these in and then with that I'll end the tutorial.
Right, we've got 'Parse error'.
We either need a comma or a semicolon to end, which proves that as we're coming up to here, we need a semicolon after this.
But in actual fact, that's not true.
So, just keep them as inverted commas.
Okay, that's the basics of the echo function and the PHP tags. Hope you enjoyed learning them.
Thanks for watching! This script has been translated by ---------------------------(translator's name) and this is -----------------------------------(narrator's name) signing off.