[SIZE="6"]Getting Started.[/SIZE]
What is PHP?
PHP is a widely-used general-purpose scripting language that is especially suited for Web development and can be embedded into HTML.
What do I need?
You will need a text editor, notepad will do fine, but I prefer to script in PSPad because it has syntax highlighting (shows colors for different things, so its easier to understand and read.)
Website: http://www.pspad.com/
Download: http://www.pspad.com/en/download.php
You will need a web-server that can read php, either go and get free or paid php web-hosting or you can download WAMP, which is an Apache server that can run php and mysql, and best of all you can choose weather to put it online or not (so if someone types your IP into there web-browser it will show all the stuff you have in it.)
Info: http://www.wampserver.com/en/
Download: http://www.wampserver.com/en/download.php
And last of all you will need a web-browser, Internet Explorer will do just fine, but IE is for fags and we want a cool browser don't we, like opera.
Info: http://www.opera.com/
Download: http://www.opera.com/download/
Now once there all installed where good to go.
Evo's Epic PHP Tutorial[PHP][Coding]
Started by: Evolution | Replies: 1 | Views: 1,011 | Closed
Sep 30, 2007 9:54 AM #61197
Sep 30, 2007 10:24 AM #61200
[SIZE="6"]Hello World[/SIZE]
When using PHP you must always start and end the part of the code with
Simple egnough, eh?
Now to learn that cool trick I just did
Thats called a comment, you do one by putting // on the start of a line and PHP will ignore the it, its a good way to sort out your code as it will not actually change the finished product in any way and you can see what/why you have done it, in-case you forget.
Now we're going to make the PHP say hello world so lets start by creating a new document in PSPad (file -> new file -> PHP) and saving it as helloworld.php. Now we must check if we have the PHP opening and closing tags in it (PSPad puts them in by default)
And now to make PHP say something. We do this by using an echo and one looks like this
we start by typing echo on a new line then a space then a ' then what you want it to say then another ' then a ;
We must put the ; at the end of the line to symbolise that it is the end of the line, don't need them though.
This will look like this when you open it up in a browser
When using PHP you must always start and end the part of the code with
//code goes here
?>
Simple egnough, eh?
Now to learn that cool trick I just did
//code goes here
Thats called a comment, you do one by putting // on the start of a line and PHP will ignore the it, its a good way to sort out your code as it will not actually change the finished product in any way and you can see what/why you have done it, in-case you forget.
Now we're going to make the PHP say hello world so lets start by creating a new document in PSPad (file -> new file -> PHP) and saving it as helloworld.php. Now we must check if we have the PHP opening and closing tags in it (PSPad puts them in by default)
?>
And now to make PHP say something. We do this by using an echo and one looks like this
echo 'Hello world';
we start by typing echo on a new line then a space then a ' then what you want it to say then another ' then a ;
We must put the ; at the end of the line to symbolise that it is the end of the line, don't need them though.
This will look like this when you open it up in a browser
Hello world