Search for notes by fellow students, in your own course and all over the country.
Browse our notes for titles which look like what you need, you can preview any of the notes via a sample of the contents. After you're happy these are the notes you're after simply pop them into your shopping cart.
Title: PHP
Description: A complete basic tutorial of PHP the language that rules the internet.
Description: A complete basic tutorial of PHP the language that rules the internet.
Document Preview
Extracts from the notes are below, to see the PDF you'll receive please use the links above
PHP
• PHP is an acronym for "PHP: Hypertext
Preprocessor"
• PHP is a widely-used, open source scripting
language
• PHP scripts are executed on the server
• PHP is free to download and use
What is a PHP File?
• PHP files can contain text, HTML, CSS,
JavaScript, and PHP code
• PHP code are executed on the server, and the
result is returned to the browser as plain
HTML
• PHP files have extension "
...
)
• PHP is compatible with almost all servers used
today (Apache, IIS, etc
...
Download it from the official PHP
resource: www
...
net
• PHP is easy to learn and runs efficiently on the
server side
SYNTAX
• PHP script can be placed anywhere in the
document
...
php"
...
•
My first PHP page
echo "Hello World!";
?>
• Variables are "containers" for storing information
...
• When a variable is declared, it can be used over
and over again in your script
...
• The correct way of declaring a variable in PHP:
• $var_name = value;
Rules for PHP variables:
• A variable starts with the $ sign, followed by the
name of the variable
• A variable name must start with a letter or the
underscore character
• A variable name cannot start with a number
• A variable name can only contain alpha-numeric
characters and underscores (A-z, 0-9, and _ )
• Variable names are case-sensitive ($age and
$AGE are two different variables)
• creating a variable containing a string, and a
variable containing a number:
• $txt="Hello World!";
$x=16;
?>
Output Variables
• The PHP echo statement is often used to
output data to the screen
...
com";
echo "I love $txt!";
?>
In PHP there are two basic ways to get
output: echo and print
...
";
?>
• $txt1 = "Learn PHP";
$txt2 = "W3Schools
...
com";
$x = 5;
$y = 4;
print "
"
...
"
";print "Study PHP at "
...
"
";
print $x + $y;
?>