SlideShare a Scribd company logo
1 of 13
Guru99

DEVELOPING WEB APPLICATIONS
WITH PHP

RAD for the World Wide Web

Guru99
By. Krishna Rungta
INTRODUCTION
hat is PHP?
• PHP stands for "PHP Hypertext Preprocessor”
• An embedded scripting language for HTML like ASP or JSP
• A language that combines elements of Perl, C, and Java

Guru99
Guru99

INTRODUCTION
istory of PHP
• Created by Rasmus Lerdorf in 1995 for tracking access to his resume
• Originally a set of Perl scripts known as the “Personal Home Page”
tools
• Rewritten in C with database functionality
• Added a forms interpreter and released as PHP/FI: includes Perl-like
variables, and HTML embedded syntax
PHP LANGUAGE BASICS
ello World!: An Example
• Like Perl, there is more than one way to do it
• <?php echo “Hello World!”; ?>
• <?php
$greeting = “Hello World!”
printf(“%s”, $greeting);
php?>

Guru99
PHP LANGUAGE BASICS
onstants, Data Types and Variables
• Constants define a string or numeric value
• Constants do not begin with a dollar sign
• Examples:
•
•
•
•

define(“COMPANY”, “Acme Enterprises”);
define(“YELLOW”, “#FFFF00”);
define(“PI”, 3.14);
define(“NL”, “<br>n”);

Guru99
PHP LANGUAGE BASICS
onstants, Data Types and Variables
• Using a constant
• print(“Company name: “ . COMPANY . NL);

Guru99
PHP LANGUAGE BASICS
onstants, Data Types and Variables
• Data types
• Integers, doubles and strings
• isValid = true; // Boolean
• 25
// Integer
• 3.14
// Double
• ‘Four’
// String
• “Total value” // Another string

Guru99
PHP LANGUAGE BASICS
onstants, Data Types and Variables
• Data types
• Strings and type conversion
• $street = 123;
• $street = $street . “ Main Street”;
• $city = ‘Naperville’;
$state = ‘IL’;
• $address = $street;
• $address = $address . NL . “$city, $state”;
• $number = $address + 1;
// $number equals 124

Guru99
PHP LANGUAGE BASICS
onstants, Data Types and Variables
• Data types
• Arrays
• Perl-like syntax
• $arr = array("foo" => "bar", 12 => true);
• same as
• $arr[“foo”] = “bar”;
• $arr[12] = true;
PHP LANGUAGE BASICS
onstants, Data Types and Variables
• Arrays (cont.)
• <?php
$arr = array("somearray" => array(6 => 5, 13 => 9,
"a" => 42));
echo $arr["somearray"][6]; // 5
echo $arr["somearray"][13]; // 9
echo $arr["somearray"]["a"]; // 42
?>
PHP LANGUAGE BASICS
onstants, Data Types and Variables
• Objects
• Currently not much more advanced than than associative arrays
Using constants
• Before version 5.0, objects are passed by value
• Slow
• Functions can not easily change object variables
TRICKS AND TIPS
ebugging
• Feature: PHP is not a strongly typed language
• Variables can be created anywhere in your code

• Undocumented Feature: PHP is not a strongly typed language
• Typos in variable names will cause stuff to happen
RESOURCES
• To Learn more thing about PHP
Just Visit our site

• http://web.guru99.com/
• Thank You

More Related Content

What's hot

What's hot (13)

Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1
 
PHP POWERPOINT SLIDES
PHP POWERPOINT SLIDESPHP POWERPOINT SLIDES
PHP POWERPOINT SLIDES
 
Web Development Course: PHP lecture 3
Web Development Course: PHP lecture 3Web Development Course: PHP lecture 3
Web Development Course: PHP lecture 3
 
Class 6 - PHP Web Programming
Class 6 - PHP Web ProgrammingClass 6 - PHP Web Programming
Class 6 - PHP Web Programming
 
PHP and MySQL
PHP and MySQLPHP and MySQL
PHP and MySQL
 
Web Development Course: PHP lecture 4
Web Development Course: PHP  lecture 4Web Development Course: PHP  lecture 4
Web Development Course: PHP lecture 4
 
Quick beginner to Lower-Advanced guide/tutorial in PHP
Quick beginner to Lower-Advanced guide/tutorial in PHPQuick beginner to Lower-Advanced guide/tutorial in PHP
Quick beginner to Lower-Advanced guide/tutorial in PHP
 
Apache Velocity 1.6
Apache Velocity 1.6Apache Velocity 1.6
Apache Velocity 1.6
 
Introducation to php for beginners
Introducation to php for beginners Introducation to php for beginners
Introducation to php for beginners
 
DIG1108C Lesson3 Fall 2014
DIG1108C Lesson3 Fall 2014DIG1108C Lesson3 Fall 2014
DIG1108C Lesson3 Fall 2014
 
PHP
PHPPHP
PHP
 
Php with my sql
Php with my sqlPhp with my sql
Php with my sql
 
Manipulating Data in Style with SQL
Manipulating Data in Style with SQLManipulating Data in Style with SQL
Manipulating Data in Style with SQL
 

Viewers also liked

Crash Course in Perl – Perl tutorial for C programmers
Crash Course in Perl – Perl tutorial for C programmersCrash Course in Perl – Perl tutorial for C programmers
Crash Course in Perl – Perl tutorial for C programmers
Gil Megidish
 
Introduction to Perl - Day 2
Introduction to Perl - Day 2Introduction to Perl - Day 2
Introduction to Perl - Day 2
Dave Cross
 

Viewers also liked (13)

Crash Course in Perl – Perl tutorial for C programmers
Crash Course in Perl – Perl tutorial for C programmersCrash Course in Perl – Perl tutorial for C programmers
Crash Course in Perl – Perl tutorial for C programmers
 
Perl 101
Perl 101Perl 101
Perl 101
 
Vb.net Experiment with Example
Vb.net Experiment with ExampleVb.net Experiment with Example
Vb.net Experiment with Example
 
Setting up and installing perl
Setting up and installing perlSetting up and installing perl
Setting up and installing perl
 
Introduction to perl_ a scripting language
Introduction to perl_ a scripting languageIntroduction to perl_ a scripting language
Introduction to perl_ a scripting language
 
Basic perl programming
Basic perl programmingBasic perl programming
Basic perl programming
 
How to learn to code
How to learn to codeHow to learn to code
How to learn to code
 
Advance java
Advance javaAdvance java
Advance java
 
Building Decision Tree model with numerical attributes
Building Decision Tree model with numerical attributesBuilding Decision Tree model with numerical attributes
Building Decision Tree model with numerical attributes
 
Introduction to Perl - Day 2
Introduction to Perl - Day 2Introduction to Perl - Day 2
Introduction to Perl - Day 2
 
Introduction to Perl - Day 1
Introduction to Perl - Day 1Introduction to Perl - Day 1
Introduction to Perl - Day 1
 
Introduction to perl
Introduction to perlIntroduction to perl
Introduction to perl
 
Introduction to Data Mining and Big Data Analytics
Introduction to Data Mining and Big Data AnalyticsIntroduction to Data Mining and Big Data Analytics
Introduction to Data Mining and Big Data Analytics
 

Similar to 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)
Muhamad Al Imran
 
MIND sweeping introduction to PHP
MIND sweeping introduction to PHPMIND sweeping introduction to PHP
MIND sweeping introduction to PHP
BUDNET
 

Similar to Php (20)

Data Types In PHP
Data Types In PHPData Types In PHP
Data Types In PHP
 
Website designing company_in_delhi_phpwebdevelopment
Website designing company_in_delhi_phpwebdevelopmentWebsite designing company_in_delhi_phpwebdevelopment
Website designing company_in_delhi_phpwebdevelopment
 
Phpwebdevelping
PhpwebdevelpingPhpwebdevelping
Phpwebdevelping
 
Phpwebdev
PhpwebdevPhpwebdev
Phpwebdev
 
Synapse india reviews on php website development
Synapse india reviews on php website developmentSynapse india reviews on php website development
Synapse india reviews on php website development
 
Perl bhargav
Perl bhargavPerl bhargav
Perl bhargav
 
PHP Basics and Demo HackU
PHP Basics and Demo HackUPHP Basics and Demo HackU
PHP Basics and Demo HackU
 
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)
 
Php
PhpPhp
Php
 
Php basics
Php basicsPhp basics
Php basics
 
phpwebdev.ppt
phpwebdev.pptphpwebdev.ppt
phpwebdev.ppt
 
05php
05php05php
05php
 
Introduction to Perl
Introduction to PerlIntroduction to Perl
Introduction to Perl
 
PHP
PHPPHP
PHP
 
php (Hypertext Preprocessor)
php (Hypertext Preprocessor)php (Hypertext Preprocessor)
php (Hypertext Preprocessor)
 
INTRODUCTION to php.pptx
INTRODUCTION to php.pptxINTRODUCTION to php.pptx
INTRODUCTION to php.pptx
 
Prersentation
PrersentationPrersentation
Prersentation
 
rtwerewr
rtwerewrrtwerewr
rtwerewr
 
Introduction in php
Introduction in phpIntroduction in php
Introduction in php
 
MIND sweeping introduction to PHP
MIND sweeping introduction to PHPMIND sweeping introduction to PHP
MIND sweeping introduction to PHP
 

More from Guru99

More from Guru99 (14)

Best single, dual monitor stands
Best single, dual monitor standsBest single, dual monitor stands
Best single, dual monitor stands
 
VBSCript Tutorial
VBSCript TutorialVBSCript Tutorial
VBSCript Tutorial
 
Photoshop cc Tutorial
Photoshop cc TutorialPhotoshop cc Tutorial
Photoshop cc Tutorial
 
Apache Tutorial
Apache TutorialApache Tutorial
Apache Tutorial
 
Nodejs Tutorial
Nodejs TutorialNodejs Tutorial
Nodejs Tutorial
 
Asp.net Tutorial
Asp.net TutorialAsp.net Tutorial
Asp.net Tutorial
 
Cassandra Tutorial
Cassandra TutorialCassandra Tutorial
Cassandra Tutorial
 
BigData Hadoop Tutorial
BigData Hadoop TutorialBigData Hadoop Tutorial
BigData Hadoop Tutorial
 
Python tutorial
Python tutorialPython tutorial
Python tutorial
 
SQLite Tutorial
SQLite TutorialSQLite Tutorial
SQLite Tutorial
 
Hbase Tutorial
Hbase TutorialHbase Tutorial
Hbase Tutorial
 
Introduction to Jmeter
Introduction to JmeterIntroduction to Jmeter
Introduction to Jmeter
 
Lrt top 10
Lrt top 10Lrt top 10
Lrt top 10
 
What is Loadrunner ?
What is Loadrunner ?What is Loadrunner ?
What is Loadrunner ?
 

Recently uploaded

Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
ssuserdda66b
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Recently uploaded (20)

Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 

Php

  • 1. Guru99 DEVELOPING WEB APPLICATIONS WITH PHP RAD for the World Wide Web Guru99 By. Krishna Rungta
  • 2. INTRODUCTION hat is PHP? • PHP stands for "PHP Hypertext Preprocessor” • An embedded scripting language for HTML like ASP or JSP • A language that combines elements of Perl, C, and Java Guru99
  • 3. Guru99 INTRODUCTION istory of PHP • Created by Rasmus Lerdorf in 1995 for tracking access to his resume • Originally a set of Perl scripts known as the “Personal Home Page” tools • Rewritten in C with database functionality • Added a forms interpreter and released as PHP/FI: includes Perl-like variables, and HTML embedded syntax
  • 4. PHP LANGUAGE BASICS ello World!: An Example • Like Perl, there is more than one way to do it • <?php echo “Hello World!”; ?> • <?php $greeting = “Hello World!” printf(“%s”, $greeting); php?> Guru99
  • 5. PHP LANGUAGE BASICS onstants, Data Types and Variables • Constants define a string or numeric value • Constants do not begin with a dollar sign • Examples: • • • • define(“COMPANY”, “Acme Enterprises”); define(“YELLOW”, “#FFFF00”); define(“PI”, 3.14); define(“NL”, “<br>n”); Guru99
  • 6. PHP LANGUAGE BASICS onstants, Data Types and Variables • Using a constant • print(“Company name: “ . COMPANY . NL); Guru99
  • 7. PHP LANGUAGE BASICS onstants, Data Types and Variables • Data types • Integers, doubles and strings • isValid = true; // Boolean • 25 // Integer • 3.14 // Double • ‘Four’ // String • “Total value” // Another string Guru99
  • 8. PHP LANGUAGE BASICS onstants, Data Types and Variables • Data types • Strings and type conversion • $street = 123; • $street = $street . “ Main Street”; • $city = ‘Naperville’; $state = ‘IL’; • $address = $street; • $address = $address . NL . “$city, $state”; • $number = $address + 1; // $number equals 124 Guru99
  • 9. PHP LANGUAGE BASICS onstants, Data Types and Variables • Data types • Arrays • Perl-like syntax • $arr = array("foo" => "bar", 12 => true); • same as • $arr[“foo”] = “bar”; • $arr[12] = true;
  • 10. PHP LANGUAGE BASICS onstants, Data Types and Variables • Arrays (cont.) • <?php $arr = array("somearray" => array(6 => 5, 13 => 9, "a" => 42)); echo $arr["somearray"][6]; // 5 echo $arr["somearray"][13]; // 9 echo $arr["somearray"]["a"]; // 42 ?>
  • 11. PHP LANGUAGE BASICS onstants, Data Types and Variables • Objects • Currently not much more advanced than than associative arrays Using constants • Before version 5.0, objects are passed by value • Slow • Functions can not easily change object variables
  • 12. TRICKS AND TIPS ebugging • Feature: PHP is not a strongly typed language • Variables can be created anywhere in your code • Undocumented Feature: PHP is not a strongly typed language • Typos in variable names will cause stuff to happen
  • 13. RESOURCES • To Learn more thing about PHP Just Visit our site • http://web.guru99.com/ • Thank You