Hey , Welcome to this PHP Tutorial , #1
First off, to start a php script you have to have this:
OR
That is just to tell the server that it is a PHP script .
i like the first one better, Now that you know how to start a PHP script, we will get into simple functions..
1. How To print stuff onto the screen
to print out stuff onto the screen you can use
or
that would output on the webpage, Text you want to print here..
now lets move on to variables, variables are useful for quicker coding, organizing , for example
or
or
or
Well.. you get the idea, there millions of possible ways to do that, what that will output is "This is a Variable".
Thanks For Reading My PHP Tutorial #1 !
First off, to start a php script you have to have this:
PHP:
<?php
?>
PHP:
<?
?>
i like the first one better, Now that you know how to start a PHP script, we will get into simple functions..
1. How To print stuff onto the screen
to print out stuff onto the screen you can use
PHP:
echo "Text You Want To Print Here";
PHP:
print "Text You Want To Print Here";
now lets move on to variables, variables are useful for quicker coding, organizing , for example
PHP:
$variable = "This is";
$variable1 = " a Variable";
echo $variable . $variable1;
PHP:
$variable = "This is";
$variable1 = " a Variable";
echo "{$variable}{$variable1}";
PHP:
$variable = "This is";
$variable1 = $variable . " a Variable";
echo $variable1;
PHP:
$variable = "This is";
$variable1 = $variable . " a Variable";
echo "{$variable1}";
Well.. you get the idea, there millions of possible ways to do that, what that will output is "This is a Variable".
Thanks For Reading My PHP Tutorial #1 !