php tutorial | pTutorial - PowerPoint PPT Presentation

About This Presentation
Title:

php tutorial | pTutorial

Description:

ptutorial, programming tutorial, php tutorial, php function, php example, c tutorial, c example, object oriented programming in php, error handling in php, array handling with sorting – PowerPoint PPT presentation

Number of Views:85

less

Transcript and Presenter's Notes

Title: php tutorial | pTutorial


1
Introduction of PHP
  • By Umar Farooque Khan
  • http//www.ptutorial.com

2
(No Transcript)
3
What is PHP?
  • PHP stand for hypertext pre-processor.
  • PHP is a general purpose server side scripting
    language that is basically used for web
    development.
  • PHP script run on web server.
  • PHP is used for dynamic web page creation.
  • PHP run on GUI based operating system as well
    as Command based .
  • PHP can easily embedded with HTML.
  • Its freely available.

4
Why PHP?
  • Its fast
  • Its free
  • Its easy to use
  • Its versatile
  • Its secure
  • Its customizable
  • Interact with HTML forms
  • Communicate with databases
  • Generate secure Web pages
  • Easy to learn and implement.

5
Supported Databases
  • dBASE
  • Informix
  • Ingres
  • Microsoft SQL Server
  • mSQL
  • MySQL
  • Oracle
  • PostgreSQL
  • Sybase

6
Basic Syntax
  • lthtmlgt
  • ltheadgt
  • lttitlegtFirst Script of PHPlt/titlegt
  • lt/headgt
  • ltbodygt
  • lt?php
  • echo Welcome to the php word!"
  • echo www.ptutorial.com
  • ?gt
  • lt/bodygt
  • lt/htmlgt

7
Commenting in PHP
  • PHP supports two type of commenting
  • 1. Single line comment
  • lt?php
  • echo Comment in php" // Single line Comment
  • this also a single line comment
  • echo www.ptutorial.com"
  • ?gt

8
Commenting continued in PHP
  • 2. Multi line Comment
  • lt?php
  • echo Comment in php
  • echo Multiple line comment"
  • / this multi line comment
  • You can put any number of line /
  • echo www.ptutorial.com"
  • ?gt

9
Echo Statement
  • In PHP echo statement is used for deliver the
    string as well as variable value on the browse,
    Following example explain the concept of echo
    statement.
  • lt?php
  • echo Welcome to the php word!"
  • number38
  • echo number
  • strwww.ptutorial.com
  • Echo str
  • ?gt

10
The Semicolon and Case Sensitivity
  • Every statement must be terminated with
    semicolon.
  • In PHP functions, classes, core language keywords
    are case-insensitive.
  • lt?php
  • echo Welcome to the php word!"
  • Echo www.ptutorial.com //case insensitive
  • ?gt

11
PHP Variables
  • Variables are just identifier that are used for
    storing data, like integer, float, strings,
    arrays.
  • In PHP there is no need to declare before use.
  • Dollar sign is used at the time of making
    variable.

12
Rules of making PHP variable
  • It must be starts with dollar() sign.
  • A valid variable name start with string or
    underscore after dollar sign.
  • PHP variable can any length.
  • PHP variables are case sensitive.

13
Example of valid variable
  • name52
  • name_112
  • var145af102
  • _php586
  • a145java
  • first_name_14875

14
Example of PHP Variable
  • lt?php
  • txtwww.ptutorial.com!"
  • Number152
  • a18.5
  • Echo number . a
  • ?gt
Write a Comment
User Comments (0)
About PowerShow.com