PDA

View Full Version : Php Basics



GFX^^
09-21-2005, 03:22 PM
Requirements

Notepad, or any word processing program

Step 1

Okay, so you are here to learn about PHP basics. The first thing I will introduce to you is the <?php and the ?> commands.

<?php

?>

<?php = this is the opening tag for a PHP code, just like <html>
?> = this is the closing tag for a PHP code, lust like </html>

Now I will introduce the ECHO and Print commands:

<?php

echo ("Hello World");

?>

echo = that is the echo statement
(" = your opening tag, anything between the (" and ") is what will be echo'd
") = closing tag
; = end of the line and on to a new command

You can also use the PRINT command, it serves the same purpose as the echo command.

<?php

echo ("This is a message using ECHO");
print ("This is a message using PRINT");

?>

That is it. You can use the INCLUDE command to display files as well. Like lets say your navigation is always changing because of your content, and you don't want to update each page changing the navigation bar. So what you do is, save your navigation bar in a separate file, such as navigationbar.html and then in your main document put:

<?php

include ("navbar.html");

?>

Now you know some basics to help your website using the PHP web language. (make sure your server supports PHP)

by pixelfull

Lord Alex
10-05-2005, 07:27 PM
that well finally a tutorial php in conditions :)

Unnamed~
10-06-2005, 05:04 PM
Rightly what was searching.

Thanks sou much ;)

madelinekim
05-30-2013, 05:32 AM
PHP is the best scripting language which is widely used in many organizations to develop dynamic web applications. There are lots of PHP tutorials are available on the web which you can use to learn various frameworks of PHP like CakePHP.

linhkute1
08-21-2017, 04:34 PM
thanks madelinekim
i think PHP is best language.

d773hf82jhf721hf