SlideShare a Scribd company logo
1 of 31
Download to read offline
PHP
What is HTML?
HyperText Markup Language (HTML) is the main
markup language for web pages
Why HTML?
What is CSS?
Cascading Style Sheets (CSS) is a style sheet
language used for describing the presentation
semantics (the look and formatting) of HTML

     h1 { color: white; background-color: orange; }
     h2 { color: white; background-color: green; }
Why CSS?
Cascading Style Sheets (CSS) is a style sheet
language used for describing the presentation
semantics (the look and formatting) of HTML

     h1 { color: white; background-color: orange; }
     h2 { color: white; background-color: green; }
What is Javascript?
JavaScript is a scripting language

      function sum() {
              var i, x = 0;
              for (i = 0; i < arguments.length; ++i) {
                      x += arguments[i];
              }
              return x;
      }
Why Javascript?
HTML provides only one way communication
                                    Why the
                                   hell don’t
                                   you talk to
                                      me?




                      Hey, are
                        you
                       there?
HTML is static and boring.
With pure HTML web pages, the server simply
serves up static HTML that can only display
content.
With a little help from
                                 the server




Okay, PHP brings web pages to life
#webpage
    #static_page
    #dynamic_page
    #form
PHP Syntax
     <html>
     <body>
              <?php
                      echo "Hello World";
              ?>

     </body>
     </html>
String
           <?php
                   $txt="Hello World";
                   echo $txt;
           ?>

Concatenation Operator
           <?php
                $txt1="Hello World!";
                 $txt2="What a nice day!";
                 echo $txt1 . " " . $txt2;
           ?>

strlen()
           strlen("Hello world!")
strpos
           strpos("Hello world!","world");
Function
     function functionName()
     {
              echo(“Hello world”);
     }
Use PHP to access form data
PHP scripts must live on a server
A variable is a container that you can store data in.
Arithmetic Operators
Assignment Operators
Comparison Operators
Logical Operators
If … else
Array
        Numeric Arrays
                $cars=array("Saab","Volvo","BMW","Toyota");




        Associative Arrays
                $ages = array("Peter"=>32, "Quagmire"=>30, "Joe"=>34);
For loops
     for ($i=1; $i<=5; $i++)
     {
         echo "The number is " . $i . "<br />";
     }

More Related Content

Viewers also liked

Hietanen-Peltola: Valtakunnalliset ohjeet ja toimintamallit - apua arjen työhön
Hietanen-Peltola: Valtakunnalliset ohjeet ja toimintamallit - apua arjen työhönHietanen-Peltola: Valtakunnalliset ohjeet ja toimintamallit - apua arjen työhön
Hietanen-Peltola: Valtakunnalliset ohjeet ja toimintamallit - apua arjen työhönKouluterveyskysely
 
Helenius: Koulun mahdollisuudet kohdata nuorten seksuaalista häirintää
Helenius: Koulun mahdollisuudet kohdata nuorten seksuaalista häirintääHelenius: Koulun mahdollisuudet kohdata nuorten seksuaalista häirintää
Helenius: Koulun mahdollisuudet kohdata nuorten seksuaalista häirintääKouluterveyskysely
 
最大会派はコメントなし!? 議会活性化検討委員会資料
最大会派はコメントなし!? 議会活性化検討委員会資料最大会派はコメントなし!? 議会活性化検討委員会資料
最大会派はコメントなし!? 議会活性化検討委員会資料長野市議会議員小泉一真
 
Pbl session 1 meet the problem - notes of discussion
Pbl session 1   meet the problem - notes of discussionPbl session 1   meet the problem - notes of discussion
Pbl session 1 meet the problem - notes of discussionMay Mei
 
Правильная чистка зубов
Правильная чистка зубовПравильная чистка зубов
Правильная чистка зубовcrasgmu
 
Wis2011_presentation_Realtime_Events_on_LOD
Wis2011_presentation_Realtime_Events_on_LODWis2011_presentation_Realtime_Events_on_LOD
Wis2011_presentation_Realtime_Events_on_LODPramod Koneru
 
Tecido adiposo e cartilaginoso
Tecido adiposo e cartilaginosoTecido adiposo e cartilaginoso
Tecido adiposo e cartilaginosobiomedunifil
 
Phones by molly
Phones by mollyPhones by molly
Phones by mollyeileen1112
 
Teatro de la sensacion curso de danza moderna iniciación
Teatro de la sensacion curso de danza moderna iniciaciónTeatro de la sensacion curso de danza moderna iniciación
Teatro de la sensacion curso de danza moderna iniciaciónMiguel Muñoz de Morales
 
Curriculum night20101
Curriculum night20101Curriculum night20101
Curriculum night20101awebster1
 
Plague, Defoe
Plague, DefoePlague, Defoe
Plague, Defoems_faris
 
Angical fest 2011 1º dia 2
Angical fest 2011 1º dia 2Angical fest 2011 1º dia 2
Angical fest 2011 1º dia 2angical-piaui
 
Hirei phonedeveloper
Hirei phonedeveloperHirei phonedeveloper
Hirei phonedevelopermilindshroff1
 
ECNC: the year in review
ECNC: the year in reviewECNC: the year in review
ECNC: the year in reviewhanneke_wijnja
 

Viewers also liked (20)

Hietanen-Peltola: Valtakunnalliset ohjeet ja toimintamallit - apua arjen työhön
Hietanen-Peltola: Valtakunnalliset ohjeet ja toimintamallit - apua arjen työhönHietanen-Peltola: Valtakunnalliset ohjeet ja toimintamallit - apua arjen työhön
Hietanen-Peltola: Valtakunnalliset ohjeet ja toimintamallit - apua arjen työhön
 
Helenius: Koulun mahdollisuudet kohdata nuorten seksuaalista häirintää
Helenius: Koulun mahdollisuudet kohdata nuorten seksuaalista häirintääHelenius: Koulun mahdollisuudet kohdata nuorten seksuaalista häirintää
Helenius: Koulun mahdollisuudet kohdata nuorten seksuaalista häirintää
 
Living with copyright
Living with copyrightLiving with copyright
Living with copyright
 
Epics
EpicsEpics
Epics
 
最大会派はコメントなし!? 議会活性化検討委員会資料
最大会派はコメントなし!? 議会活性化検討委員会資料最大会派はコメントなし!? 議会活性化検討委員会資料
最大会派はコメントなし!? 議会活性化検討委員会資料
 
affTA05 - BAB V
affTA05 - BAB VaffTA05 - BAB V
affTA05 - BAB V
 
Pbl session 1 meet the problem - notes of discussion
Pbl session 1   meet the problem - notes of discussionPbl session 1   meet the problem - notes of discussion
Pbl session 1 meet the problem - notes of discussion
 
Правильная чистка зубов
Правильная чистка зубовПравильная чистка зубов
Правильная чистка зубов
 
Wis2011_presentation_Realtime_Events_on_LOD
Wis2011_presentation_Realtime_Events_on_LODWis2011_presentation_Realtime_Events_on_LOD
Wis2011_presentation_Realtime_Events_on_LOD
 
Tecido adiposo e cartilaginoso
Tecido adiposo e cartilaginosoTecido adiposo e cartilaginoso
Tecido adiposo e cartilaginoso
 
Phones by molly
Phones by mollyPhones by molly
Phones by molly
 
บูรณาการอาเชียน ม.1
บูรณาการอาเชียน ม.1บูรณาการอาเชียน ม.1
บูรณาการอาเชียน ม.1
 
Teatro de la sensacion curso de danza moderna iniciación
Teatro de la sensacion curso de danza moderna iniciaciónTeatro de la sensacion curso de danza moderna iniciación
Teatro de la sensacion curso de danza moderna iniciación
 
Curriculum night20101
Curriculum night20101Curriculum night20101
Curriculum night20101
 
Plague, Defoe
Plague, DefoePlague, Defoe
Plague, Defoe
 
Presentation1
Presentation1Presentation1
Presentation1
 
Angical fest 2011 1º dia 2
Angical fest 2011 1º dia 2Angical fest 2011 1º dia 2
Angical fest 2011 1º dia 2
 
Parent survey report District
Parent survey report DistrictParent survey report District
Parent survey report District
 
Hirei phonedeveloper
Hirei phonedeveloperHirei phonedeveloper
Hirei phonedeveloper
 
ECNC: the year in review
ECNC: the year in reviewECNC: the year in review
ECNC: the year in review
 

Similar to Php (20)

Php
PhpPhp
Php
 
PHP and MySQL.ppt
PHP and MySQL.pptPHP and MySQL.ppt
PHP and MySQL.ppt
 
Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1Web Development Course: PHP lecture 1
Web Development Course: PHP lecture 1
 
Php
PhpPhp
Php
 
Web technology html5 php_mysql
Web technology html5 php_mysqlWeb technology html5 php_mysql
Web technology html5 php_mysql
 
Prersentation
PrersentationPrersentation
Prersentation
 
PHP Introduction and Training Material
PHP Introduction and Training MaterialPHP Introduction and Training Material
PHP Introduction and Training Material
 
1336333055 php tutorial_from_beginner_to_master
1336333055 php tutorial_from_beginner_to_master1336333055 php tutorial_from_beginner_to_master
1336333055 php tutorial_from_beginner_to_master
 
Php
PhpPhp
Php
 
Intro to-php-19 jun10
Intro to-php-19 jun10Intro to-php-19 jun10
Intro to-php-19 jun10
 
Php tutorial(w3schools)
Php tutorial(w3schools)Php tutorial(w3schools)
Php tutorial(w3schools)
 
Php tutorialw3schools
Php tutorialw3schoolsPhp tutorialw3schools
Php tutorialw3schools
 
Php
PhpPhp
Php
 
Php mysql
Php mysqlPhp mysql
Php mysql
 
WEB DEVELOPMENT
WEB DEVELOPMENTWEB DEVELOPMENT
WEB DEVELOPMENT
 
Php
PhpPhp
Php
 
PHP - Introduction to PHP Fundamentals
PHP -  Introduction to PHP FundamentalsPHP -  Introduction to PHP Fundamentals
PHP - Introduction to PHP Fundamentals
 
Php
PhpPhp
Php
 
Php notes 01
Php notes 01Php notes 01
Php notes 01
 
1st workshop web.pptx
1st workshop web.pptx1st workshop web.pptx
1st workshop web.pptx
 

More from Tuan Ngo

Introduction of cg program for portal 20120424 en
Introduction of cg program for portal 20120424 enIntroduction of cg program for portal 20120424 en
Introduction of cg program for portal 20120424 enTuan Ngo
 
Net framework
Net frameworkNet framework
Net frameworkTuan Ngo
 
15 anonymous methods, partial types and nullable types
15   anonymous methods, partial types and nullable types15   anonymous methods, partial types and nullable types
15 anonymous methods, partial types and nullable typesTuan Ngo
 
14 generics and iterators
14   generics and iterators14   generics and iterators
14 generics and iteratorsTuan Ngo
 
13 collections
13   collections13   collections
13 collectionsTuan Ngo
 
11 exception handling
11   exception handling11   exception handling
11 exception handlingTuan Ngo
 
12 events and delegates
12   events and delegates12   events and delegates
12 events and delegatesTuan Ngo
 
9 properties & indexers
9   properties & indexers9   properties & indexers
9 properties & indexersTuan Ngo
 
10 namespace
10  namespace10  namespace
10 namespaceTuan Ngo
 
8 abstract classes and interfaces
8   abstract classes and interfaces 8   abstract classes and interfaces
8 abstract classes and interfaces Tuan Ngo
 
7 inheritance and polymorphism
7   inheritance and polymorphism7   inheritance and polymorphism
7 inheritance and polymorphismTuan Ngo
 
6 class and methods
6    class and methods6    class and methods
6 class and methodsTuan Ngo
 
3 statements and operators
3   statements and operators3   statements and operators
3 statements and operatorsTuan Ngo
 
4 c# programming constructs
4   c# programming constructs4   c# programming constructs
4 c# programming constructsTuan Ngo
 
1 get started with c#
1   get started with c#1   get started with c#
1 get started with c#Tuan Ngo
 
2 variables and data types
2   variables and data types2   variables and data types
2 variables and data typesTuan Ngo
 

More from Tuan Ngo (20)

Introduction of cg program for portal 20120424 en
Introduction of cg program for portal 20120424 enIntroduction of cg program for portal 20120424 en
Introduction of cg program for portal 20120424 en
 
Net framework
Net frameworkNet framework
Net framework
 
15 anonymous methods, partial types and nullable types
15   anonymous methods, partial types and nullable types15   anonymous methods, partial types and nullable types
15 anonymous methods, partial types and nullable types
 
14 generics and iterators
14   generics and iterators14   generics and iterators
14 generics and iterators
 
13 collections
13   collections13   collections
13 collections
 
11 exception handling
11   exception handling11   exception handling
11 exception handling
 
12 events and delegates
12   events and delegates12   events and delegates
12 events and delegates
 
9 properties & indexers
9   properties & indexers9   properties & indexers
9 properties & indexers
 
10 namespace
10  namespace10  namespace
10 namespace
 
8 abstract classes and interfaces
8   abstract classes and interfaces 8   abstract classes and interfaces
8 abstract classes and interfaces
 
7 inheritance and polymorphism
7   inheritance and polymorphism7   inheritance and polymorphism
7 inheritance and polymorphism
 
5 arrays
5   arrays5   arrays
5 arrays
 
6 class and methods
6    class and methods6    class and methods
6 class and methods
 
3 statements and operators
3   statements and operators3   statements and operators
3 statements and operators
 
4 c# programming constructs
4   c# programming constructs4   c# programming constructs
4 c# programming constructs
 
1 get started with c#
1   get started with c#1   get started with c#
1 get started with c#
 
2 variables and data types
2   variables and data types2   variables and data types
2 variables and data types
 
Jdbc 7
Jdbc 7Jdbc 7
Jdbc 7
 
Jdbc 6
Jdbc 6Jdbc 6
Jdbc 6
 
Jdbc 3
Jdbc 3Jdbc 3
Jdbc 3
 

Recently uploaded

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 

Recently uploaded (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 

Php