SlideShare una empresa de Scribd logo
1 de 21
Getting Started With PHP
Install Webserver
                    Linux


http://www.apachefriends.org/en/xampp-linux.html
An introductory example
   <!DOCTYPE HTML PUBLIC "-//W3C//
   DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
    <head>
        <title>Example</title>
    </head>
    <body>

        <?php
            echo "Hi, I'm a PHP script!";
        ?>

    </body>
Our first PHP script
Our first PHP script
<html>
 <head>
  <title>PHP Test</title>
 </head>
 <body>
 <?php echo '<p>Hello World</p>'; ?> 
 </body>
</html>
Our first PHP script
<html>
 <head>
  <title>PHP Test</title>
 </head>
 <body>
 <p>Hello World</p>
 </body>
</html>
Get system information
      from PHP

    <?
PHP Variables
  <?php
$var = 'Bob';
$Var = 'Joe';
echo "$var, $Var"; // outputs "Bob, Joe"

// invalid; starts with a number
$4site ='not yet'; 


?>
Reference Variable
   <?php
// Assign the value 'Bob' to $foo
$foo = 'Bob';  
// Reference $foo via $bar.
$bar = &$foo;      
// Alter $bar...        
$bar = "My name is $bar";  
echo $bar;
// $foo is altered too.
echo $foo;                 
?>
PHP Arrays
$ php array.php
Array
(
   [0] => 1
   [1] => 2
   [2] => 3
   [3] => 4
   [4] => 5
   [5] => 6
   [6] => a
   [7] => b
   [8] => cat
   [9] => dog
)
PHP Arrays & For loop
PHP Arrays & Foreach
For loop vs Foreach
For loop vs Foreach
For loop vs Foreach
For loop vs Foreach
PHP : Functions
  <?php
function a($n){
  b($n);
  return ($n * $n);
}

function b(&$n){
  $n++;
}

echo a(5); //Outputs 36
?>
PHP: Functions
          (global statement)
   <?php
$foo = 1;
bar(); // call function
function bar()
{

 global $foo;

 $foo++;

 echo "$foo in function bar() = " . $foo."n";
}
echo "$foo in main = " . $foo."n";
?>
Outputs
$foo in function bar() = 2
$foo in main = 2
Standard Input (Keyboard)
  
 echo "Enter Username : ";

 $username = fgets (STDIN, 1024);

 echo "Enter Password : ";

 $password = fgets (STDIN, 1024);
Standard Functions
array_push
trim
print_r
var_dump
My website

http://www.together.in.th

Más contenido relacionado

La actualidad más candente

What's new in PHP 5.5
What's new in PHP 5.5What's new in PHP 5.5
What's new in PHP 5.5Tom Corrigan
 
Php 7 hhvm and co
Php 7 hhvm and coPhp 7 hhvm and co
Php 7 hhvm and coPierre Joye
 
Introducing PHP Latest Updates
Introducing PHP Latest UpdatesIntroducing PHP Latest Updates
Introducing PHP Latest UpdatesIftekhar Eather
 
Yapcasia2011 - Hello Embed Perl
Yapcasia2011 - Hello Embed PerlYapcasia2011 - Hello Embed Perl
Yapcasia2011 - Hello Embed PerlHideaki Ohno
 
I, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 OverlordsI, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 Overlordsheumann
 
Php in 2013 (Web-5 2013 conference)
Php in 2013 (Web-5 2013 conference)Php in 2013 (Web-5 2013 conference)
Php in 2013 (Web-5 2013 conference)julien pauli
 
Advanced modulinos trial
Advanced modulinos trialAdvanced modulinos trial
Advanced modulinos trialbrian d foy
 
Zend Framework Study@Tokyo #2
Zend Framework Study@Tokyo #2Zend Framework Study@Tokyo #2
Zend Framework Study@Tokyo #2Shinya Ohyanagi
 
PHP Tips for certification - OdW13
PHP Tips for certification - OdW13PHP Tips for certification - OdW13
PHP Tips for certification - OdW13julien pauli
 
Introduction to Guzzle
Introduction to GuzzleIntroduction to Guzzle
Introduction to GuzzleDQNEO
 
PHP Optimization
PHP OptimizationPHP Optimization
PHP Optimizationdjesch
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐいHisateru Tanaka
 
R版Getopt::Longを作ってみた
R版Getopt::Longを作ってみたR版Getopt::Longを作ってみた
R版Getopt::Longを作ってみたTakeshi Arabiki
 
Working with databases in Perl
Working with databases in PerlWorking with databases in Perl
Working with databases in PerlLaurent Dami
 
Legacy applications - 4Developes konferencja, Piotr Pasich
Legacy applications  - 4Developes konferencja, Piotr PasichLegacy applications  - 4Developes konferencja, Piotr Pasich
Legacy applications - 4Developes konferencja, Piotr PasichPiotr Pasich
 
第1回PHP拡張勉強会
第1回PHP拡張勉強会第1回PHP拡張勉強会
第1回PHP拡張勉強会Ippei Ogiwara
 
Troubleshooting Plone
Troubleshooting PloneTroubleshooting Plone
Troubleshooting PloneRicado Alves
 

La actualidad más candente (20)

What's new in PHP 5.5
What's new in PHP 5.5What's new in PHP 5.5
What's new in PHP 5.5
 
Php 7 hhvm and co
Php 7 hhvm and coPhp 7 hhvm and co
Php 7 hhvm and co
 
Introducing PHP Latest Updates
Introducing PHP Latest UpdatesIntroducing PHP Latest Updates
Introducing PHP Latest Updates
 
Yapcasia2011 - Hello Embed Perl
Yapcasia2011 - Hello Embed PerlYapcasia2011 - Hello Embed Perl
Yapcasia2011 - Hello Embed Perl
 
PHP5.5 is Here
PHP5.5 is HerePHP5.5 is Here
PHP5.5 is Here
 
I, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 OverlordsI, For One, Welcome Our New Perl6 Overlords
I, For One, Welcome Our New Perl6 Overlords
 
Php in 2013 (Web-5 2013 conference)
Php in 2013 (Web-5 2013 conference)Php in 2013 (Web-5 2013 conference)
Php in 2013 (Web-5 2013 conference)
 
Advanced modulinos trial
Advanced modulinos trialAdvanced modulinos trial
Advanced modulinos trial
 
Zend Framework Study@Tokyo #2
Zend Framework Study@Tokyo #2Zend Framework Study@Tokyo #2
Zend Framework Study@Tokyo #2
 
Perl5i
Perl5iPerl5i
Perl5i
 
PHP Tips for certification - OdW13
PHP Tips for certification - OdW13PHP Tips for certification - OdW13
PHP Tips for certification - OdW13
 
Introduction to Guzzle
Introduction to GuzzleIntroduction to Guzzle
Introduction to Guzzle
 
PHP Optimization
PHP OptimizationPHP Optimization
PHP Optimization
 
関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
 
Perl6 grammars
Perl6 grammarsPerl6 grammars
Perl6 grammars
 
R版Getopt::Longを作ってみた
R版Getopt::Longを作ってみたR版Getopt::Longを作ってみた
R版Getopt::Longを作ってみた
 
Working with databases in Perl
Working with databases in PerlWorking with databases in Perl
Working with databases in Perl
 
Legacy applications - 4Developes konferencja, Piotr Pasich
Legacy applications  - 4Developes konferencja, Piotr PasichLegacy applications  - 4Developes konferencja, Piotr Pasich
Legacy applications - 4Developes konferencja, Piotr Pasich
 
第1回PHP拡張勉強会
第1回PHP拡張勉強会第1回PHP拡張勉強会
第1回PHP拡張勉強会
 
Troubleshooting Plone
Troubleshooting PloneTroubleshooting Plone
Troubleshooting Plone
 

Destacado

Cara Membangun Web Server (IIS7) di Windows Server 2008
Cara Membangun Web Server (IIS7) di Windows Server 2008Cara Membangun Web Server (IIS7) di Windows Server 2008
Cara Membangun Web Server (IIS7) di Windows Server 2008Muhamad Prasetyo
 
Membangun Webserver IIS7
Membangun Webserver IIS7Membangun Webserver IIS7
Membangun Webserver IIS7Robby Angryawan
 
Understanding Web Cache
Understanding Web CacheUnderstanding Web Cache
Understanding Web CacheProdigyView
 
Cara Membangun Web Server dengan HTTPS di Windows Server 2008
Cara Membangun Web Server dengan HTTPS di Windows Server 2008Cara Membangun Web Server dengan HTTPS di Windows Server 2008
Cara Membangun Web Server dengan HTTPS di Windows Server 2008Muhamad Prasetyo
 

Destacado (6)

Set up dev environment
Set up dev environmentSet up dev environment
Set up dev environment
 
Cara Membangun Web Server (IIS7) di Windows Server 2008
Cara Membangun Web Server (IIS7) di Windows Server 2008Cara Membangun Web Server (IIS7) di Windows Server 2008
Cara Membangun Web Server (IIS7) di Windows Server 2008
 
Membangun Webserver IIS7
Membangun Webserver IIS7Membangun Webserver IIS7
Membangun Webserver IIS7
 
Understanding Web Cache
Understanding Web CacheUnderstanding Web Cache
Understanding Web Cache
 
Xampp Ppt
Xampp PptXampp Ppt
Xampp Ppt
 
Cara Membangun Web Server dengan HTTPS di Windows Server 2008
Cara Membangun Web Server dengan HTTPS di Windows Server 2008Cara Membangun Web Server dengan HTTPS di Windows Server 2008
Cara Membangun Web Server dengan HTTPS di Windows Server 2008
 

Similar a GettingStartedWithPHP

Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHPBradley Holt
 
HackU PHP and Node.js
HackU PHP and Node.jsHackU PHP and Node.js
HackU PHP and Node.jssouridatta
 
Lecture2_IntroductionToPHP_Spring2023.pdf
Lecture2_IntroductionToPHP_Spring2023.pdfLecture2_IntroductionToPHP_Spring2023.pdf
Lecture2_IntroductionToPHP_Spring2023.pdfShaimaaMohamedGalal
 
Introducation to php for beginners
Introducation to php for beginners Introducation to php for beginners
Introducation to php for beginners musrath mohammad
 
PHP Basics and Demo HackU
PHP Basics and Demo HackUPHP Basics and Demo HackU
PHP Basics and Demo HackUAnshu Prateek
 
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016Codemotion
 
Php7 HHVM and co
Php7 HHVM and coPhp7 HHVM and co
Php7 HHVM and coweltling
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy CodeRowan Merewood
 
Php7 hhvm and co
Php7 hhvm and coPhp7 hhvm and co
Php7 hhvm and coPierre Joye
 
basic concept of php(Gunikhan sonowal)
basic concept of php(Gunikhan sonowal)basic concept of php(Gunikhan sonowal)
basic concept of php(Gunikhan sonowal)Guni Sonow
 
PHP: The easiest language to learn.
PHP: The easiest language to learn.PHP: The easiest language to learn.
PHP: The easiest language to learn.Binny V A
 
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)Muhamad Al Imran
 
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)Muhamad Al Imran
 

Similar a GettingStartedWithPHP (20)

What's new with PHP7
What's new with PHP7What's new with PHP7
What's new with PHP7
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
Wt unit 4 server side technology-2
Wt unit 4 server side technology-2Wt unit 4 server side technology-2
Wt unit 4 server side technology-2
 
Php with my sql
Php with my sqlPhp with my sql
Php with my sql
 
HackU PHP and Node.js
HackU PHP and Node.jsHackU PHP and Node.js
HackU PHP and Node.js
 
Lecture2_IntroductionToPHP_Spring2023.pdf
Lecture2_IntroductionToPHP_Spring2023.pdfLecture2_IntroductionToPHP_Spring2023.pdf
Lecture2_IntroductionToPHP_Spring2023.pdf
 
PHP and MySQL.ppt
PHP and MySQL.pptPHP and MySQL.ppt
PHP and MySQL.ppt
 
Introducation to php for beginners
Introducation to php for beginners Introducation to php for beginners
Introducation to php for beginners
 
Introduction to PHP
Introduction to PHPIntroduction to PHP
Introduction to PHP
 
PHP Basics and Demo HackU
PHP Basics and Demo HackUPHP Basics and Demo HackU
PHP Basics and Demo HackU
 
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
The new features of PHP 7 - Enrico Zimuel - Codemotion Milan 2016
 
Php7 HHVM and co
Php7 HHVM and coPhp7 HHVM and co
Php7 HHVM and co
 
Living With Legacy Code
Living With Legacy CodeLiving With Legacy Code
Living With Legacy Code
 
Php7 hhvm and co
Php7 hhvm and coPhp7 hhvm and co
Php7 hhvm and co
 
basic concept of php(Gunikhan sonowal)
basic concept of php(Gunikhan sonowal)basic concept of php(Gunikhan sonowal)
basic concept of php(Gunikhan sonowal)
 
Hacking with hhvm
Hacking with hhvmHacking with hhvm
Hacking with hhvm
 
PHP: The easiest language to learn.
PHP: The easiest language to learn.PHP: The easiest language to learn.
PHP: The easiest language to learn.
 
Php i basic chapter 3
Php i basic chapter 3Php i basic chapter 3
Php i basic chapter 3
 
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
Php i basic chapter 3 (syahir chaer's conflicted copy 2013-04-22)
 
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
Php i basic chapter 3 (afifah rosli's conflicted copy 2013-04-23)
 

Más de Nat Weerawan

KidBright Plugin development
KidBright Plugin developmentKidBright Plugin development
KidBright Plugin developmentNat Weerawan
 
Kidbright plugin development
Kidbright plugin developmentKidbright plugin development
Kidbright plugin developmentNat Weerawan
 
CMMC - CNX - Community of Practice 1
CMMC - CNX - Community of Practice 1CMMC - CNX - Community of Practice 1
CMMC - CNX - Community of Practice 1Nat Weerawan
 
Chiang Mai Maker Club & Thailand 4.0
Chiang Mai Maker Club & Thailand 4.0Chiang Mai Maker Club & Thailand 4.0
Chiang Mai Maker Club & Thailand 4.0Nat Weerawan
 
What is Chiang Mai Maker Club - BRIEF
What is Chiang Mai Maker Club - BRIEFWhat is Chiang Mai Maker Club - BRIEF
What is Chiang Mai Maker Club - BRIEFNat Weerawan
 
Create connected home devices using a Raspberry Pi, Siri and ESPNow for makers.
Create connected home devices using a Raspberry Pi, Siri and ESPNow for makers.Create connected home devices using a Raspberry Pi, Siri and ESPNow for makers.
Create connected home devices using a Raspberry Pi, Siri and ESPNow for makers.Nat Weerawan
 
Chaing Mai Maker Club @Creative Thailand Symposium
Chaing Mai Maker Club @Creative Thailand SymposiumChaing Mai Maker Club @Creative Thailand Symposium
Chaing Mai Maker Club @Creative Thailand SymposiumNat Weerawan
 
Netpie.io Generate MQTT Credential
Netpie.io Generate MQTT CredentialNetpie.io Generate MQTT Credential
Netpie.io Generate MQTT CredentialNat Weerawan
 
IBM Bluemix & IoT Foundation
IBM Bluemix & IoT FoundationIBM Bluemix & IoT Foundation
IBM Bluemix & IoT FoundationNat Weerawan
 
CMMC - Chiang Mai Maker Club
CMMC - Chiang Mai Maker ClubCMMC - Chiang Mai Maker Club
CMMC - Chiang Mai Maker ClubNat Weerawan
 
Link it smart 7688 MEETUP - Bangkok
Link it smart 7688 MEETUP - BangkokLink it smart 7688 MEETUP - Bangkok
Link it smart 7688 MEETUP - BangkokNat Weerawan
 
LoveNotYet - The first Thailand sex education game.
LoveNotYet - The first Thailand sex education game.LoveNotYet - The first Thailand sex education game.
LoveNotYet - The first Thailand sex education game.Nat Weerawan
 
Raspberry Pi @ Beercamp Chiangmai
Raspberry Pi @ Beercamp ChiangmaiRaspberry Pi @ Beercamp Chiangmai
Raspberry Pi @ Beercamp ChiangmaiNat Weerawan
 
Raspberry pi meetup Bangkok
Raspberry pi meetup BangkokRaspberry pi meetup Bangkok
Raspberry pi meetup BangkokNat Weerawan
 
Booklat @ Social Innovation Camp Asia 2013 (SICA2013)
Booklat @ Social Innovation Camp Asia 2013 (SICA2013)Booklat @ Social Innovation Camp Asia 2013 (SICA2013)
Booklat @ Social Innovation Camp Asia 2013 (SICA2013)Nat Weerawan
 

Más de Nat Weerawan (20)

MLBlock
MLBlockMLBlock
MLBlock
 
CMMC IoT & MQTT
CMMC IoT & MQTTCMMC IoT & MQTT
CMMC IoT & MQTT
 
KidBright Plugin development
KidBright Plugin developmentKidBright Plugin development
KidBright Plugin development
 
Kidbright plugin development
Kidbright plugin developmentKidbright plugin development
Kidbright plugin development
 
ESPNow Again..
ESPNow Again..ESPNow Again..
ESPNow Again..
 
CMMC - IoT
CMMC - IoTCMMC - IoT
CMMC - IoT
 
CMMC - CNX - Community of Practice 1
CMMC - CNX - Community of Practice 1CMMC - CNX - Community of Practice 1
CMMC - CNX - Community of Practice 1
 
Chiang Mai Maker Club & Thailand 4.0
Chiang Mai Maker Club & Thailand 4.0Chiang Mai Maker Club & Thailand 4.0
Chiang Mai Maker Club & Thailand 4.0
 
What is Chiang Mai Maker Club - BRIEF
What is Chiang Mai Maker Club - BRIEFWhat is Chiang Mai Maker Club - BRIEF
What is Chiang Mai Maker Club - BRIEF
 
Create connected home devices using a Raspberry Pi, Siri and ESPNow for makers.
Create connected home devices using a Raspberry Pi, Siri and ESPNow for makers.Create connected home devices using a Raspberry Pi, Siri and ESPNow for makers.
Create connected home devices using a Raspberry Pi, Siri and ESPNow for makers.
 
Chaing Mai Maker Club @Creative Thailand Symposium
Chaing Mai Maker Club @Creative Thailand SymposiumChaing Mai Maker Club @Creative Thailand Symposium
Chaing Mai Maker Club @Creative Thailand Symposium
 
Netpie.io Generate MQTT Credential
Netpie.io Generate MQTT CredentialNetpie.io Generate MQTT Credential
Netpie.io Generate MQTT Credential
 
IBM Bluemix & IoT Foundation
IBM Bluemix & IoT FoundationIBM Bluemix & IoT Foundation
IBM Bluemix & IoT Foundation
 
CMMC - Chiang Mai Maker Club
CMMC - Chiang Mai Maker ClubCMMC - Chiang Mai Maker Club
CMMC - Chiang Mai Maker Club
 
Link it smart 7688 MEETUP - Bangkok
Link it smart 7688 MEETUP - BangkokLink it smart 7688 MEETUP - Bangkok
Link it smart 7688 MEETUP - Bangkok
 
Gdg wednesday
Gdg wednesdayGdg wednesday
Gdg wednesday
 
LoveNotYet - The first Thailand sex education game.
LoveNotYet - The first Thailand sex education game.LoveNotYet - The first Thailand sex education game.
LoveNotYet - The first Thailand sex education game.
 
Raspberry Pi @ Beercamp Chiangmai
Raspberry Pi @ Beercamp ChiangmaiRaspberry Pi @ Beercamp Chiangmai
Raspberry Pi @ Beercamp Chiangmai
 
Raspberry pi meetup Bangkok
Raspberry pi meetup BangkokRaspberry pi meetup Bangkok
Raspberry pi meetup Bangkok
 
Booklat @ Social Innovation Camp Asia 2013 (SICA2013)
Booklat @ Social Innovation Camp Asia 2013 (SICA2013)Booklat @ Social Innovation Camp Asia 2013 (SICA2013)
Booklat @ Social Innovation Camp Asia 2013 (SICA2013)
 

Último

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
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.docxRamakrishna Reddy Bijjam
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
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...christianmathematics
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Shubhangi Sonawane
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDThiyagu K
 
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.MaryamAhmad92
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIShubhangi Sonawane
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesShubhangi Sonawane
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 

Último (20)

Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
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
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
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...
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
Ecological Succession. ( ECOSYSTEM, B. Pharmacy, 1st Year, Sem-II, Environmen...
 
Measures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SDMeasures of Dispersion and Variability: Range, QD, AD and SD
Measures of Dispersion and Variability: Range, QD, AD and SD
 
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.
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-IIFood Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
Food Chain and Food Web (Ecosystem) EVS, B. Pharmacy 1st Year, Sem-II
 
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural ResourcesEnergy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
Energy Resources. ( B. Pharmacy, 1st Year, Sem-II) Natural Resources
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 

GettingStartedWithPHP

  • 2. Install Webserver Linux http://www.apachefriends.org/en/xampp-linux.html
  • 3. An introductory example <!DOCTYPE HTML PUBLIC "-//W3C// DTD HTML 4.01 Transitional//EN"     "http://www.w3.org/TR/html4/loose.dtd"> <html>     <head>         <title>Example</title>     </head>     <body>         <?php             echo "Hi, I'm a PHP script!";         ?>     </body>
  • 4. Our first PHP script
  • 5. Our first PHP script <html>  <head>   <title>PHP Test</title>  </head>  <body>  <?php echo '<p>Hello World</p>'; ?>   </body> </html>
  • 6. Our first PHP script <html>  <head>   <title>PHP Test</title>  </head>  <body>  <p>Hello World</p>  </body> </html>
  • 8. PHP Variables <?php $var = 'Bob'; $Var = 'Joe'; echo "$var, $Var"; // outputs "Bob, Joe" // invalid; starts with a number $4site ='not yet';  ?>
  • 9. Reference Variable <?php // Assign the value 'Bob' to $foo $foo = 'Bob';   // Reference $foo via $bar. $bar = &$foo;       // Alter $bar...         $bar = "My name is $bar";   echo $bar; // $foo is altered too. echo $foo;                  ?>
  • 10. PHP Arrays $ php array.php Array ( [0] => 1 [1] => 2 [2] => 3 [3] => 4 [4] => 5 [5] => 6 [6] => a [7] => b [8] => cat [9] => dog )
  • 11. PHP Arrays & For loop
  • 12. PHP Arrays & Foreach
  • 13. For loop vs Foreach
  • 14. For loop vs Foreach
  • 15. For loop vs Foreach
  • 16. For loop vs Foreach
  • 17. PHP : Functions <?php function a($n){   b($n);   return ($n * $n); } function b(&$n){   $n++; } echo a(5); //Outputs 36 ?>
  • 18. PHP: Functions (global statement) <?php $foo = 1; bar(); // call function function bar() { global $foo; $foo++; echo "$foo in function bar() = " . $foo."n"; } echo "$foo in main = " . $foo."n"; ?> Outputs $foo in function bar() = 2 $foo in main = 2
  • 19. Standard Input (Keyboard) echo "Enter Username : "; $username = fgets (STDIN, 1024); echo "Enter Password : "; $password = fgets (STDIN, 1024);