SlideShare a Scribd company logo
Horizon Software
Solutions
http://phptraininginjaipur.info/
http://phptraininginjaipur.info/
PHP
Introduction
What is PHP ??
PHP is Hyper Text Processor
– Other Names : Personal Home Page, Professional
Home Page
• Is a server side scripting language.
– Capable of generating the HTML pages
• HTML generates the web page with the static text and
images.
• However the need evolved for dynamic web based
application, mostly involving database usage.
• http://phptraininginjaipur.info/
How PHP Works??
http://phptraininginjaipur.info/phttp://phptraininginjaipur.info/
PHP Language Features
• PHP language features such as control structures,
operators, variable types, function declaration,
class/object declaration are almost similar to any
compiled or interpreted language such as C or C++.
• http://phptraininginjaipur.info/
PHP Data Types
Three basic data types
– Integer
– Double
– String
• More data types
– Array
– Object
• PHP is an untyped language
– variables type can change on the fly.
–http://phptraininginjaipur.info/
PHP Constants
• ..values that never changes
• Constants are defined in PHP by using the define()
function.
– For e.g.
define(“NCST”, “National Centre for Software Technology”)
• defined() function says whether the constant
exists or not.
• http://phptraininginjaipur.info/
PHP Variables
• The variables in PHP are declared by appending the $
sign to the variable name.
– For e.g
$company = “NCST”;
$sum = 10.0;
• variable’s data type is changed by the value that is
assigned to the variable.
• Type casting allows to change the data type explicitly.
• http://phptraininginjaipur.info/
PHP Operators
• All the operators such as arithmetic, assignment,
Comparison, and logical operators are similar to the
operators in C and C++.
• In PHP the string concatenation operator is denoted by
‘.’.
– For e.g.
• $name = “My name is”.$myname;
• http://phptraininginjaipur.info/
PHP Statements
• IF statement
if (<condition>) {
//php code goes here
}
else {
//php code goes here
}
• Alternative Syntax
if(<condition>) :
//html code goes here
else :
//html code goes here
endif;
http://phptraininginjaipur.info/
PHP Statements (cont.)
• For loop
for($i=0;$i < 10;$++i) {
echo(“the value is :”. $i);
}
– Alternative Syntax
for($i=0;$i < 10;$++i) :
// html code goes here
endfor;
• While loop
• Do-While loop
• http://phptraininginjaipur.info/
Arrays
. contains value set
• each element has a value, data stored in the element.
• And has a key by which the element can be referred to
• http://phptraininginjaipur.info/
Initializing Arrays
• No of ways to initialize the array.
– For e.g.
• $ncststaff[] = “amrish”;
$ncststaff[] = “murali”;
$ncststaff[] = “narayan”;
• $ncststaff[123] = “amrish”;
$ncststaff[122] = “murali”;
$ncststaff[121] = “narayan”;
• $ncststaff = array (“amrish”, “murali”, “narayan”);
– to change the indices of the array use => operator.
–http://phptraininginjaipur.info/
Accessing the Array Elements
– Array_walk(<arrayname>,<function_name>)
• function_name is the function that is written for every member of
an array.
• For e.g
$ncststaff = array (“amrish”, “murali”, “narayan”);
array_walk ($ncststaff, printstaff);
// function to print each element of the array
function printstaff($names) {
echo “<B>$names</B><BR>n”;
}
http://phptraininginjaipur.info/
To see more:
http://phptraininginjaipur.i
nfo/
Thank You !!
Horizon Software Solutions
http://phptraininginjaipur.info/

More Related Content

What's hot

Common Gateway Interface
Common Gateway InterfaceCommon Gateway Interface
Common Gateway Interface
Balu Masulkar
 
Serialization in Go
Serialization in GoSerialization in Go
Serialization in Go
Albert Strasheim
 
Linux Apache Php Mysql Lamp1273
Linux Apache Php Mysql Lamp1273Linux Apache Php Mysql Lamp1273
Linux Apache Php Mysql Lamp1273
hussulinux
 
HTTP & HTML & Web
HTTP & HTML & WebHTTP & HTML & Web
HTTP & HTML & Web
Peter R. Egli
 
The constrained application protocol (coap) part 2
The constrained application protocol (coap)  part 2The constrained application protocol (coap)  part 2
The constrained application protocol (coap) part 2
Hamdamboy (함담보이)
 
What's up with HTTP?
What's up with HTTP?What's up with HTTP?
What's up with HTTP?
Mark Nottingham
 
Rest style web services (google protocol buffers) prasad nirantar
Rest style web services (google protocol buffers)   prasad nirantarRest style web services (google protocol buffers)   prasad nirantar
Rest style web services (google protocol buffers) prasad nirantar
IndicThreads
 
Multiplexing in Thrift: Enhancing thrift to meet Enterprise expectations- Imp...
Multiplexing in Thrift: Enhancing thrift to meet Enterprise expectations- Imp...Multiplexing in Thrift: Enhancing thrift to meet Enterprise expectations- Imp...
Multiplexing in Thrift: Enhancing thrift to meet Enterprise expectations- Imp...
Impetus Technologies
 
PHP Training: Module 1
PHP Training: Module 1PHP Training: Module 1
PHP Training: Module 1
hussulinux
 
HTTP
HTTPHTTP
Ws phpl1 php_apps_basics_1.2
Ws phpl1 php_apps_basics_1.2Ws phpl1 php_apps_basics_1.2
Ws phpl1 php_apps_basics_1.2
Kensaku Suzuki
 
Http - All you need to know
Http - All you need to knowHttp - All you need to know
Http - All you need to know
Gökhan Şengün
 
Http
HttpHttp
21 HTTP Protocol #burningkeyboards
21 HTTP Protocol #burningkeyboards21 HTTP Protocol #burningkeyboards
21 HTTP Protocol #burningkeyboards
Denis Ristic
 
Under the Covers with the Web
Under the Covers with the WebUnder the Covers with the Web
Under the Covers with the Web
Trevor Lohrbeer
 
Facebook thrift
Facebook thriftFacebook thrift
Facebook thrift
Priyadarshi Raj
 
Apache Thrift : One Stop Solution for Cross Language Communication
Apache Thrift : One Stop Solution for Cross Language CommunicationApache Thrift : One Stop Solution for Cross Language Communication
Apache Thrift : One Stop Solution for Cross Language Communication
Piyush Goel
 
The constrained application protocol (coap) part 3
The constrained application protocol (coap)  part 3The constrained application protocol (coap)  part 3
The constrained application protocol (coap) part 3
Hamdamboy
 
Fm 2
Fm 2Fm 2
Fm 2
sambavade
 
HyperText Transfer Protocol
HyperText Transfer ProtocolHyperText Transfer Protocol
HyperText Transfer Protocol
ponduse
 

What's hot (20)

Common Gateway Interface
Common Gateway InterfaceCommon Gateway Interface
Common Gateway Interface
 
Serialization in Go
Serialization in GoSerialization in Go
Serialization in Go
 
Linux Apache Php Mysql Lamp1273
Linux Apache Php Mysql Lamp1273Linux Apache Php Mysql Lamp1273
Linux Apache Php Mysql Lamp1273
 
HTTP & HTML & Web
HTTP & HTML & WebHTTP & HTML & Web
HTTP & HTML & Web
 
The constrained application protocol (coap) part 2
The constrained application protocol (coap)  part 2The constrained application protocol (coap)  part 2
The constrained application protocol (coap) part 2
 
What's up with HTTP?
What's up with HTTP?What's up with HTTP?
What's up with HTTP?
 
Rest style web services (google protocol buffers) prasad nirantar
Rest style web services (google protocol buffers)   prasad nirantarRest style web services (google protocol buffers)   prasad nirantar
Rest style web services (google protocol buffers) prasad nirantar
 
Multiplexing in Thrift: Enhancing thrift to meet Enterprise expectations- Imp...
Multiplexing in Thrift: Enhancing thrift to meet Enterprise expectations- Imp...Multiplexing in Thrift: Enhancing thrift to meet Enterprise expectations- Imp...
Multiplexing in Thrift: Enhancing thrift to meet Enterprise expectations- Imp...
 
PHP Training: Module 1
PHP Training: Module 1PHP Training: Module 1
PHP Training: Module 1
 
HTTP
HTTPHTTP
HTTP
 
Ws phpl1 php_apps_basics_1.2
Ws phpl1 php_apps_basics_1.2Ws phpl1 php_apps_basics_1.2
Ws phpl1 php_apps_basics_1.2
 
Http - All you need to know
Http - All you need to knowHttp - All you need to know
Http - All you need to know
 
Http
HttpHttp
Http
 
21 HTTP Protocol #burningkeyboards
21 HTTP Protocol #burningkeyboards21 HTTP Protocol #burningkeyboards
21 HTTP Protocol #burningkeyboards
 
Under the Covers with the Web
Under the Covers with the WebUnder the Covers with the Web
Under the Covers with the Web
 
Facebook thrift
Facebook thriftFacebook thrift
Facebook thrift
 
Apache Thrift : One Stop Solution for Cross Language Communication
Apache Thrift : One Stop Solution for Cross Language CommunicationApache Thrift : One Stop Solution for Cross Language Communication
Apache Thrift : One Stop Solution for Cross Language Communication
 
The constrained application protocol (coap) part 3
The constrained application protocol (coap)  part 3The constrained application protocol (coap)  part 3
The constrained application protocol (coap) part 3
 
Fm 2
Fm 2Fm 2
Fm 2
 
HyperText Transfer Protocol
HyperText Transfer ProtocolHyperText Transfer Protocol
HyperText Transfer Protocol
 

Similar to Introduction About PHP

Basics PHP
Basics PHPBasics PHP
Php Basics
Php BasicsPhp Basics
PHP - Introduction to PHP Fundamentals
PHP -  Introduction to PHP FundamentalsPHP -  Introduction to PHP Fundamentals
PHP - Introduction to PHP Fundamentals
Vibrant Technologies & Computers
 
Introduction to PHP.pptx
Introduction to PHP.pptxIntroduction to PHP.pptx
Introduction to PHP.pptx
SherinRappai
 
INTRODUCTION to php.pptx
INTRODUCTION to php.pptxINTRODUCTION to php.pptx
INTRODUCTION to php.pptx
priyanshupanchal8
 
Introduction to PHP_Slides by Lesley_Bonyo.pdf
Introduction to PHP_Slides by Lesley_Bonyo.pdfIntroduction to PHP_Slides by Lesley_Bonyo.pdf
Introduction to PHP_Slides by Lesley_Bonyo.pdf
MacSila
 
web Based Application Devlopment using PHP
web Based Application Devlopment using PHPweb Based Application Devlopment using PHP
web Based Application Devlopment using PHP
maccodder
 
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Muhamad Al Imran
 
Prersentation
PrersentationPrersentation
Prersentation
Ashwin Deora
 
Php
PhpPhp
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
Anjan Banda
 
Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...
Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...
Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...
anshkhurana01
 
phpwebdev.ppt
phpwebdev.pptphpwebdev.ppt
phpwebdev.ppt
rawaccess
 
Php mysql
Php mysqlPhp mysql
Module-3 15CS71-WTA-Serverside Development with PHP
Module-3 15CS71-WTA-Serverside Development with PHPModule-3 15CS71-WTA-Serverside Development with PHP
Module-3 15CS71-WTA-Serverside Development with PHP
SIVAKUMAR V
 
Php
PhpPhp
Php Tutorial
Php TutorialPhp Tutorial
Php Tutorial
pratik tambekar
 
LAB PHP Consolidated.ppt
LAB PHP Consolidated.pptLAB PHP Consolidated.ppt
LAB PHP Consolidated.ppt
YasirAhmad80
 
Materi Dasar PHP
Materi Dasar PHPMateri Dasar PHP
Materi Dasar PHP
Robby Firmansyah
 
php basic part one
php basic part onephp basic part one
php basic part one
jeweltutin
 

Similar to Introduction About PHP (20)

Basics PHP
Basics PHPBasics PHP
Basics PHP
 
Php Basics
Php BasicsPhp Basics
Php Basics
 
PHP - Introduction to PHP Fundamentals
PHP -  Introduction to PHP FundamentalsPHP -  Introduction to PHP Fundamentals
PHP - Introduction to PHP Fundamentals
 
Introduction to PHP.pptx
Introduction to PHP.pptxIntroduction to PHP.pptx
Introduction to PHP.pptx
 
INTRODUCTION to php.pptx
INTRODUCTION to php.pptxINTRODUCTION to php.pptx
INTRODUCTION to php.pptx
 
Introduction to PHP_Slides by Lesley_Bonyo.pdf
Introduction to PHP_Slides by Lesley_Bonyo.pdfIntroduction to PHP_Slides by Lesley_Bonyo.pdf
Introduction to PHP_Slides by Lesley_Bonyo.pdf
 
web Based Application Devlopment using PHP
web Based Application Devlopment using PHPweb Based Application Devlopment using PHP
web Based Application Devlopment using PHP
 
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
Php i basic chapter 3 (mardhiah kamaludin's conflicted copy 2013-04-23)
 
Prersentation
PrersentationPrersentation
Prersentation
 
Php
PhpPhp
Php
 
Introduction to php
Introduction to phpIntroduction to php
Introduction to php
 
Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...
Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...
Php mysql classes in navi-mumbai,php-mysql course provider-in-navi-mumbai,bes...
 
phpwebdev.ppt
phpwebdev.pptphpwebdev.ppt
phpwebdev.ppt
 
Php mysql
Php mysqlPhp mysql
Php mysql
 
Module-3 15CS71-WTA-Serverside Development with PHP
Module-3 15CS71-WTA-Serverside Development with PHPModule-3 15CS71-WTA-Serverside Development with PHP
Module-3 15CS71-WTA-Serverside Development with PHP
 
Php
PhpPhp
Php
 
Php Tutorial
Php TutorialPhp Tutorial
Php Tutorial
 
LAB PHP Consolidated.ppt
LAB PHP Consolidated.pptLAB PHP Consolidated.ppt
LAB PHP Consolidated.ppt
 
Materi Dasar PHP
Materi Dasar PHPMateri Dasar PHP
Materi Dasar PHP
 
php basic part one
php basic part onephp basic part one
php basic part one
 

Introduction About PHP

  • 3. What is PHP ?? PHP is Hyper Text Processor – Other Names : Personal Home Page, Professional Home Page • Is a server side scripting language. – Capable of generating the HTML pages • HTML generates the web page with the static text and images. • However the need evolved for dynamic web based application, mostly involving database usage. • http://phptraininginjaipur.info/
  • 5. PHP Language Features • PHP language features such as control structures, operators, variable types, function declaration, class/object declaration are almost similar to any compiled or interpreted language such as C or C++. • http://phptraininginjaipur.info/
  • 6. PHP Data Types Three basic data types – Integer – Double – String • More data types – Array – Object • PHP is an untyped language – variables type can change on the fly. –http://phptraininginjaipur.info/
  • 7. PHP Constants • ..values that never changes • Constants are defined in PHP by using the define() function. – For e.g. define(“NCST”, “National Centre for Software Technology”) • defined() function says whether the constant exists or not. • http://phptraininginjaipur.info/
  • 8. PHP Variables • The variables in PHP are declared by appending the $ sign to the variable name. – For e.g $company = “NCST”; $sum = 10.0; • variable’s data type is changed by the value that is assigned to the variable. • Type casting allows to change the data type explicitly. • http://phptraininginjaipur.info/
  • 9. PHP Operators • All the operators such as arithmetic, assignment, Comparison, and logical operators are similar to the operators in C and C++. • In PHP the string concatenation operator is denoted by ‘.’. – For e.g. • $name = “My name is”.$myname; • http://phptraininginjaipur.info/
  • 10. PHP Statements • IF statement if (<condition>) { //php code goes here } else { //php code goes here } • Alternative Syntax if(<condition>) : //html code goes here else : //html code goes here endif; http://phptraininginjaipur.info/
  • 11. PHP Statements (cont.) • For loop for($i=0;$i < 10;$++i) { echo(“the value is :”. $i); } – Alternative Syntax for($i=0;$i < 10;$++i) : // html code goes here endfor; • While loop • Do-While loop • http://phptraininginjaipur.info/
  • 12. Arrays . contains value set • each element has a value, data stored in the element. • And has a key by which the element can be referred to • http://phptraininginjaipur.info/
  • 13. Initializing Arrays • No of ways to initialize the array. – For e.g. • $ncststaff[] = “amrish”; $ncststaff[] = “murali”; $ncststaff[] = “narayan”; • $ncststaff[123] = “amrish”; $ncststaff[122] = “murali”; $ncststaff[121] = “narayan”; • $ncststaff = array (“amrish”, “murali”, “narayan”); – to change the indices of the array use => operator. –http://phptraininginjaipur.info/
  • 14. Accessing the Array Elements – Array_walk(<arrayname>,<function_name>) • function_name is the function that is written for every member of an array. • For e.g $ncststaff = array (“amrish”, “murali”, “narayan”); array_walk ($ncststaff, printstaff); // function to print each element of the array function printstaff($names) { echo “<B>$names</B><BR>n”; } http://phptraininginjaipur.info/
  • 16. Thank You !! Horizon Software Solutions http://phptraininginjaipur.info/