Wednesday 4 July 2018

WEB DEVELOPMENT SCRIPTING LANGUAGE PHP

WEB DEVELOPMENT (PHP)


About PHP.
  • PHP is a server side scripting language.
  • PHP is a powerful tool for making dynamic and interactive web pages.
  • PHP is a language for creating interactive web sites and is used on over 4 million web sites around the world.
  • PHP file can contain text,HTML tags and scripts.
  • PHP files are returned to the browser as plain HTML.
  • PHP files have a file extension of ".php" .
  • PHP can run on different platforms(Windows, Linux, Unix, etc).
  • PHP is compatible with almost all servers used today(Apache, IIS, etc).
Friends before read this i want you know about web development course and its languages such as HTML CSS Javascript. You find all these in these link after understand all these then learn about PHP  

Why PHP ?
  • Easy to Learn.
  • Best suited for rapid application development.
  • Easy to implement.
  • PHP community is a big support for the programmers
  • Runs on almost every platforms
  • It is free.

WAMP : Windows Apache MySQL PHP  (This is for windows It is a software that contain Apache MySQL and PHP it is a package of all these three.)
LAMP : Linux Apache MySQL PHP . (This is for Linux It is a software that contain Apache MySQL and PHP it is a package of all these three.)

PHP HISTORY
  • Earlier it was Personal Home Page.
  • Now a days it is PHP: Hypertext preprocessor.
  • It was created in 1994 byRasmus Lerdorf.
PHP Basic Syntax
  • PHP files have a file extension of ".php" .
  • PHP file may contain.
  1. HTML (Everything in HTML code in the file by default)
  2. CSS (code in style tag)
  3. Javascript(code in script tag)
  4. PHP  (code in <?php...?> ).
PHP Script
  • PHP script can be used any number of times in the php file.
  • Every piece of PHP in the page is enclosed in <?php...?>
PHP VARIABLES
  • Vaiables are used to store constants.
  • These constants could be strings, numbers, or arrays.
  • When a variable is declared,it can be used over and over again in your script.
  • All variables in PHP start with a $ sign symbol.
            Syntax.....       <?php   ( opening of PHP )
                                   $txt = "Computer";    ( variables that start with $ sign )
                                   $x = 4;
                                   ?>   (closing of PHP )
  • In PHP, the variables is declared automatically when you use it.
Name Rules 
  • A variable name must start with an alphabet or an underscore "_" .
  • A variable name can only contain alphanumeric characters and underscores (a-z, A-Z, 0-9, and _ )..
  • A variable name should not contain spaces.
  • In PHP, a variable does not need to be declared before adding a value to it.
  • PHP automatically converts the value to correct data type, depending on its value.
PHP has Four Different Variables Scopes.
  1. Local 
  2. Global
  3. Static
  4. Parameter

LOCAL SCOPE
  • Program will not generate any output.
  • The echo statement refers to the local scope variable $x
  • You can have local variables with the same name in different functions, because local variables are  only recognised by the function in which they are declared.
  • Local variables are deleted as soon as the function is completed.
GLOBAL SCOPE
  • A variabl that defined outside of any function,has a global scope.
  • To access a global scope variable from within a function, use the global keyword
  • PHP also stores global variables in an array called $GLOBAL[index]
  • The index holds the name of the variable.
  • This array is also accessible from within functions and can be used to update global variables directly.
STATIC SCOPE
  • When a function is completed, all of its variables are normally deleted.
  • Some times you want a local variable not to be deleted.
  • To do this, use the static keyword when you first declare the variable.
  • The variable is still local to the function.
  • Each time the function is called, that variable will still have the information it contained from the last time the function was called.
  • So the life og static variable is the php page.

PARAMETER SCOPE
  • A parameter is a local variable whose value is passed to the function by the calling code
  • Parameters are declared in a parameter list as part of the function declaration...

If you are interested in this and want to learn more about Internet Networking Programming Language and Technologies then join my whatsapp group by this link..



we buy cars for cash cash for car cash for cars cash cars we buy junk cars buy junk cars sell my junk car near me sell my car for cash sell car for cash sell my car for cash today cash 4 cars we buy cars for cash Car Removals Sydney https://unwantedcarremovalsydney.com.au Cash for Scrap Cars Service Unwanted Car removals Car Removal Sydney Car Removal Car Removals Car Removals Sydney Car Removals Sydney

8 comments:

( DIGITAL INDIA ) DIGITAL NETWORKING SERVICE

DATA COMMUNICATION AND NETWORKING With the advancement of Data Communication facilities the communication between computers has increa...