SlideShare a Scribd company logo
Web Basics Programming With PHP
Web Programming Languages
Before we start
By: Mohammad Al-Shalabi & Mohammad Opada Al-Bosh
http://www.aptana.com/products/studio3/download
Wampserver
http://www.wampserver.com/en/
By: Mohammad Al-Shalabi & Mohammad Opada Al-Bosh
Lesson 1 Overview:
Control statements
Functions
Loops
Arrays4
3
2
1
By: Mohammad Al-Shalabi & Mohammad Opada Al-Bosh
Control Statements
•If
if (condition)
{
code to be executed if condition is true;
}
•Example
$Successful=true;
if ($Successful==true)
{
echo "Have a good day!";
}
By: Mohammad Al-Shalabi & Mohammad Opada Al-Bosh
Control Statements
•If else
if (condition)
{ code to be executed if condition is true;}
else
{ code to be executed if condition is false; }
•Example
$Successful=true;
if ($Successful===true)
{echo "Have a good day!"; }
else
{ echo "Have a work day!"; }
By: Mohammad Al-Shalabi & Mohammad Opada Al-Bosh
Loops
•While
while (condition is true)
{
code to be executed;
}
•Example
$x=1;
while($x<=5) {
echo "The number is: $x <br>";
$x++; }
By: Mohammad Al-Shalabi & Mohammad Opada Al-Bosh
Loops
•For
for (init counter; test counter; increment counter)
{
code to be executed;
}
•Example
for ($x=0; $x<=10; $x++)
{
echo ‘<p align=“center”The number is: ‘.$x.’
<br>’;
}
By: Mohammad Al-Shalabi & Mohammad Opada Al-Bosh
Loops
•Foreach
foreach ($array as $value)
{
code to be executed;
}
•Example
$colors = array("red","green","blue","yellow");
foreach ($colors as $value)
{
echo "$value <br>";
}
By: Mohammad Al-Shalabi & Mohammad Opada Al-Bosh
Function
•Function
function functionName()
{
code to be executed;
}
•Example
function writeMsg()
{
echo "Hello world!";
}
writeMsg();
By: Mohammad Al-Shalabi & Mohammad Opada Al-Bosh
Function
•Function Arguments
function writeMsg($Msg)
{
echo $Msg;
}
•Example
writeMsg("Hello world! ");
By: Mohammad Al-Shalabi & Mohammad Opada Al-Bosh
Arrays
•Arrays
$fruits=array(
"apple", "banana“
);
$fruits[2]="orange";
•Example
$fruits[0] is "apple"
$fruits[1] is "banana"
$fruits[2] is "orange"
By: Mohammad Al-Shalabi & Mohammad Opada Al-Bosh
Arrays
•Arrays
$age=array(
"mohammad"=>"22","opada"=>"25"
,"ahmad"=>"43“
);
•Example
$age["mohammad"] is "22"
$age["opada"] is "22"
$age["ahmad"] is "43"
THANK YOU!
Ad

Recommended

Php workshop L0 Introduction
Php workshop L0 Introduction
Mohammad Tahsin Alshalabi
 
Introduction to HTML5
Introduction to HTML5
Mohammad Tahsin Alshalabi
 
Php workshop L01 CSS
Php workshop L01 CSS
Mohammad Tahsin Alshalabi
 
Fundamentals of HTML5
Fundamentals of HTML5
St. Petersburg College
 
How We Localize & Mobilize WP Sites - Pubcon 2013
How We Localize & Mobilize WP Sites - Pubcon 2013
Search Commander, Inc.
 
Keep the Web Fast
Keep the Web Fast
Chris Fetherston
 
Improve Blog Loading Time using WordPress Plugins by Minifying Scripts
Improve Blog Loading Time using WordPress Plugins by Minifying Scripts
BlashO
 
Web development basics
Web development basics
Kalluri Vinay Reddy
 
Dynamic websites lec5
Dynamic websites lec5
Belal Arfa
 
Mvp 101
Mvp 101
Franck Nouyrigat
 
Trends and Insights for Interactive Email & Google AMP for Email
Trends and Insights for Interactive Email & Google AMP for Email
SparkPost
 
DM 250 Week 1 - The Internet, XHTML, & CSS
DM 250 Week 1 - The Internet, XHTML, & CSS
Joel G Goodman
 
Lesson 01
Lesson 01
Gene Babon
 
Introduction to PHP - Slide 1
Introduction to PHP - Slide 1
pctechnology
 
Lesson 01
Lesson 01
Gene Babon
 
Web application intro
Web application intro
Tobias Pfeiffer
 
Web Fundamentals Crash Course
Web Fundamentals Crash Course
MrAbas
 
Javascript
Javascript
Manav Prasad
 
JavaScript : A trending scripting language
JavaScript : A trending scripting language
AbhayDhupar
 
Technical SEO for WordPress - 2019 edition
Technical SEO for WordPress - 2019 edition
Otto Kekäläinen
 
tips n tricks
tips n tricks
ravish roshan
 
BDD vs Behat
BDD vs Behat
The Software House
 
Angular – Say Goodbye to Javascript Soup
Angular – Say Goodbye to Javascript Soup
Graeme Foster
 
Lesson 01
Lesson 01
Gene Babon
 
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
While42
 
Introduction to html class-1
Introduction to html class-1
NoumanBalochHere
 
Css with example
Css with example
reshmy12
 
Lecture 9 - Intruduction to BOOTSTRAP.pptx
Lecture 9 - Intruduction to BOOTSTRAP.pptx
AOmaAli
 
php programming.pptx
php programming.pptx
rani marri
 
Php(report)
Php(report)
Yhannah
 

More Related Content

What's hot (19)

Dynamic websites lec5
Dynamic websites lec5
Belal Arfa
 
Mvp 101
Mvp 101
Franck Nouyrigat
 
Trends and Insights for Interactive Email & Google AMP for Email
Trends and Insights for Interactive Email & Google AMP for Email
SparkPost
 
DM 250 Week 1 - The Internet, XHTML, & CSS
DM 250 Week 1 - The Internet, XHTML, & CSS
Joel G Goodman
 
Lesson 01
Lesson 01
Gene Babon
 
Introduction to PHP - Slide 1
Introduction to PHP - Slide 1
pctechnology
 
Lesson 01
Lesson 01
Gene Babon
 
Web application intro
Web application intro
Tobias Pfeiffer
 
Web Fundamentals Crash Course
Web Fundamentals Crash Course
MrAbas
 
Javascript
Javascript
Manav Prasad
 
JavaScript : A trending scripting language
JavaScript : A trending scripting language
AbhayDhupar
 
Technical SEO for WordPress - 2019 edition
Technical SEO for WordPress - 2019 edition
Otto Kekäläinen
 
tips n tricks
tips n tricks
ravish roshan
 
BDD vs Behat
BDD vs Behat
The Software House
 
Angular – Say Goodbye to Javascript Soup
Angular – Say Goodbye to Javascript Soup
Graeme Foster
 
Lesson 01
Lesson 01
Gene Babon
 
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
While42
 
Introduction to html class-1
Introduction to html class-1
NoumanBalochHere
 
Css with example
Css with example
reshmy12
 
Dynamic websites lec5
Dynamic websites lec5
Belal Arfa
 
Trends and Insights for Interactive Email & Google AMP for Email
Trends and Insights for Interactive Email & Google AMP for Email
SparkPost
 
DM 250 Week 1 - The Internet, XHTML, & CSS
DM 250 Week 1 - The Internet, XHTML, & CSS
Joel G Goodman
 
Introduction to PHP - Slide 1
Introduction to PHP - Slide 1
pctechnology
 
Web Fundamentals Crash Course
Web Fundamentals Crash Course
MrAbas
 
JavaScript : A trending scripting language
JavaScript : A trending scripting language
AbhayDhupar
 
Technical SEO for WordPress - 2019 edition
Technical SEO for WordPress - 2019 edition
Otto Kekäläinen
 
Angular – Say Goodbye to Javascript Soup
Angular – Say Goodbye to Javascript Soup
Graeme Foster
 
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
Javascript sucks & frontend challenges @ClearSlide | while42 SF #7
While42
 
Introduction to html class-1
Introduction to html class-1
NoumanBalochHere
 
Css with example
Css with example
reshmy12
 

Similar to Php workshop L02 php basics (20)

Lecture 9 - Intruduction to BOOTSTRAP.pptx
Lecture 9 - Intruduction to BOOTSTRAP.pptx
AOmaAli
 
php programming.pptx
php programming.pptx
rani marri
 
Php(report)
Php(report)
Yhannah
 
PHP - Web Development
PHP - Web Development
Niladri Karmakar
 
Introduction To Php For Wit2009
Introduction To Php For Wit2009
cwarren
 
PHP Tutorials
PHP Tutorials
Yuriy Krapivko
 
PHP Tutorials
PHP Tutorials
Yuriy Krapivko
 
PHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with this
Ian Macali
 
PHP - Introduction to PHP Fundamentals
PHP - Introduction to PHP Fundamentals
Vibrant Technologies & Computers
 
PHP
PHP
Rowena LI
 
PHP and MySQL
PHP and MySQL
Sanketkumar Biswas
 
PHP MySQL Workshop - facehook
PHP MySQL Workshop - facehook
Shashank Skills Academy
 
Php.ppt
Php.ppt
Nidhi mishra
 
slidesharenew1
slidesharenew1
truptitasol
 
My cool new Slideshow!
My cool new Slideshow!
omprakash_bagrao_prdxn
 
PHP - Introduction to PHP - Mazenet Solution
PHP - Introduction to PHP - Mazenet Solution
Mazenetsolution
 
Php mysql
Php mysql
Alebachew Zewdu
 
Intro to php
Intro to php
Ahmed Farag
 
PPT 19.pptx
PPT 19.pptx
DrRavneetSingh
 
introduction to php web programming 2024.ppt
introduction to php web programming 2024.ppt
idaaryanie
 
Lecture 9 - Intruduction to BOOTSTRAP.pptx
Lecture 9 - Intruduction to BOOTSTRAP.pptx
AOmaAli
 
php programming.pptx
php programming.pptx
rani marri
 
Php(report)
Php(report)
Yhannah
 
Introduction To Php For Wit2009
Introduction To Php For Wit2009
cwarren
 
PHP Powerpoint -- Teach PHP with this
PHP Powerpoint -- Teach PHP with this
Ian Macali
 
PHP - Introduction to PHP - Mazenet Solution
PHP - Introduction to PHP - Mazenet Solution
Mazenetsolution
 
introduction to php web programming 2024.ppt
introduction to php web programming 2024.ppt
idaaryanie
 
Ad

More from Mohammad Tahsin Alshalabi (14)

NUMA optimized Parallel Breadth first Search on Multicore Single node System
NUMA optimized Parallel Breadth first Search on Multicore Single node System
Mohammad Tahsin Alshalabi
 
Learning Management System in Damascus University-Information Technology Engi...
Learning Management System in Damascus University-Information Technology Engi...
Mohammad Tahsin Alshalabi
 
Learning management system in information technology engineering faculty
Learning management system in information technology engineering faculty
Mohammad Tahsin Alshalabi
 
Moodle documentation
Moodle documentation
Mohammad Tahsin Alshalabi
 
Moodle plugins programing manual
Moodle plugins programing manual
Mohammad Tahsin Alshalabi
 
CodeIgniter L5 email & user agent & security
CodeIgniter L5 email & user agent & security
Mohammad Tahsin Alshalabi
 
CodeIgniter L4 file upload & image manipulation & language
CodeIgniter L4 file upload & image manipulation & language
Mohammad Tahsin Alshalabi
 
CodeIgniter L3 model & active record & template
CodeIgniter L3 model & active record & template
Mohammad Tahsin Alshalabi
 
CodeIgniter L2 helper & libraries & form validation
CodeIgniter L2 helper & libraries & form validation
Mohammad Tahsin Alshalabi
 
CodeIgniter L1 introduction to CodeIgniter framework
CodeIgniter L1 introduction to CodeIgniter framework
Mohammad Tahsin Alshalabi
 
Comparison between web and mobile application requirements
Comparison between web and mobile application requirements
Mohammad Tahsin Alshalabi
 
Introduction to web services
Introduction to web services
Mohammad Tahsin Alshalabi
 
Php workshop L04 database
Php workshop L04 database
Mohammad Tahsin Alshalabi
 
Php workshop L03 superglobals
Php workshop L03 superglobals
Mohammad Tahsin Alshalabi
 
NUMA optimized Parallel Breadth first Search on Multicore Single node System
NUMA optimized Parallel Breadth first Search on Multicore Single node System
Mohammad Tahsin Alshalabi
 
Learning Management System in Damascus University-Information Technology Engi...
Learning Management System in Damascus University-Information Technology Engi...
Mohammad Tahsin Alshalabi
 
Learning management system in information technology engineering faculty
Learning management system in information technology engineering faculty
Mohammad Tahsin Alshalabi
 
CodeIgniter L5 email & user agent & security
CodeIgniter L5 email & user agent & security
Mohammad Tahsin Alshalabi
 
CodeIgniter L4 file upload & image manipulation & language
CodeIgniter L4 file upload & image manipulation & language
Mohammad Tahsin Alshalabi
 
CodeIgniter L3 model & active record & template
CodeIgniter L3 model & active record & template
Mohammad Tahsin Alshalabi
 
CodeIgniter L2 helper & libraries & form validation
CodeIgniter L2 helper & libraries & form validation
Mohammad Tahsin Alshalabi
 
CodeIgniter L1 introduction to CodeIgniter framework
CodeIgniter L1 introduction to CodeIgniter framework
Mohammad Tahsin Alshalabi
 
Comparison between web and mobile application requirements
Comparison between web and mobile application requirements
Mohammad Tahsin Alshalabi
 
Ad

Recently uploaded (20)

On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
Hassan Abid
 
FME as an Orchestration Tool - Peak of Data & AI 2025
FME as an Orchestration Tool - Peak of Data & AI 2025
Safe Software
 
Async-ronizing Success at Wix - Patterns for Seamless Microservices - Devoxx ...
Async-ronizing Success at Wix - Patterns for Seamless Microservices - Devoxx ...
Natan Silnitsky
 
Folding Cheat Sheet # 9 - List Unfolding 𝑢𝑛𝑓𝑜𝑙𝑑 as the Computational Dual of ...
Folding Cheat Sheet # 9 - List Unfolding 𝑢𝑛𝑓𝑜𝑙𝑑 as the Computational Dual of ...
Philip Schwarz
 
Artificial Intelligence Workloads and Data Center Management
Artificial Intelligence Workloads and Data Center Management
SandeepKS52
 
DevOps for AI: running LLMs in production with Kubernetes and KubeFlow
DevOps for AI: running LLMs in production with Kubernetes and KubeFlow
Aarno Aukia
 
Emvigo Capability Deck 2025: Accelerating Innovation Through Intelligent Soft...
Emvigo Capability Deck 2025: Accelerating Innovation Through Intelligent Soft...
Emvigo Technologies
 
Smart Financial Solutions: Money Lender Software, Daily Pigmy & Personal Loan...
Smart Financial Solutions: Money Lender Software, Daily Pigmy & Personal Loan...
Intelli grow
 
What is data visualization and how data visualization tool can help.pdf
What is data visualization and how data visualization tool can help.pdf
Varsha Nayak
 
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
WSO2
 
Porting Qt 5 QML Modules to Qt 6 Webinar
Porting Qt 5 QML Modules to Qt 6 Webinar
ICS
 
How to Choose the Right Web Development Agency.pdf
How to Choose the Right Web Development Agency.pdf
Creative Fosters
 
Code and No-Code Journeys: The Coverage Overlook
Code and No-Code Journeys: The Coverage Overlook
Applitools
 
Microsoft Business-230T01A-ENU-PowerPoint_01.pptx
Microsoft Business-230T01A-ENU-PowerPoint_01.pptx
soulamaabdoulaye128
 
Download Adobe Illustrator Crack free for Windows 2025?
Download Adobe Illustrator Crack free for Windows 2025?
grete1122g
 
Shell Skill Tree - LabEx Certification (LabEx)
Shell Skill Tree - LabEx Certification (LabEx)
VICTOR MAESTRE RAMIREZ
 
UPDASP a project coordination unit ......
UPDASP a project coordination unit ......
withrj1
 
MOVIE RECOMMENDATION SYSTEM, UDUMULA GOPI REDDY, Y24MC13085.pptx
MOVIE RECOMMENDATION SYSTEM, UDUMULA GOPI REDDY, Y24MC13085.pptx
Maharshi Mallela
 
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
IFI Techsolutions
 
Automated Migration of ESRI Geodatabases Using XML Control Files and FME
Automated Migration of ESRI Geodatabases Using XML Control Files and FME
Safe Software
 
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
Hassan Abid
 
FME as an Orchestration Tool - Peak of Data & AI 2025
FME as an Orchestration Tool - Peak of Data & AI 2025
Safe Software
 
Async-ronizing Success at Wix - Patterns for Seamless Microservices - Devoxx ...
Async-ronizing Success at Wix - Patterns for Seamless Microservices - Devoxx ...
Natan Silnitsky
 
Folding Cheat Sheet # 9 - List Unfolding 𝑢𝑛𝑓𝑜𝑙𝑑 as the Computational Dual of ...
Folding Cheat Sheet # 9 - List Unfolding 𝑢𝑛𝑓𝑜𝑙𝑑 as the Computational Dual of ...
Philip Schwarz
 
Artificial Intelligence Workloads and Data Center Management
Artificial Intelligence Workloads and Data Center Management
SandeepKS52
 
DevOps for AI: running LLMs in production with Kubernetes and KubeFlow
DevOps for AI: running LLMs in production with Kubernetes and KubeFlow
Aarno Aukia
 
Emvigo Capability Deck 2025: Accelerating Innovation Through Intelligent Soft...
Emvigo Capability Deck 2025: Accelerating Innovation Through Intelligent Soft...
Emvigo Technologies
 
Smart Financial Solutions: Money Lender Software, Daily Pigmy & Personal Loan...
Smart Financial Solutions: Money Lender Software, Daily Pigmy & Personal Loan...
Intelli grow
 
What is data visualization and how data visualization tool can help.pdf
What is data visualization and how data visualization tool can help.pdf
Varsha Nayak
 
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
Application Modernization with Choreo - The AI-Native Internal Developer Plat...
WSO2
 
Porting Qt 5 QML Modules to Qt 6 Webinar
Porting Qt 5 QML Modules to Qt 6 Webinar
ICS
 
How to Choose the Right Web Development Agency.pdf
How to Choose the Right Web Development Agency.pdf
Creative Fosters
 
Code and No-Code Journeys: The Coverage Overlook
Code and No-Code Journeys: The Coverage Overlook
Applitools
 
Microsoft Business-230T01A-ENU-PowerPoint_01.pptx
Microsoft Business-230T01A-ENU-PowerPoint_01.pptx
soulamaabdoulaye128
 
Download Adobe Illustrator Crack free for Windows 2025?
Download Adobe Illustrator Crack free for Windows 2025?
grete1122g
 
Shell Skill Tree - LabEx Certification (LabEx)
Shell Skill Tree - LabEx Certification (LabEx)
VICTOR MAESTRE RAMIREZ
 
UPDASP a project coordination unit ......
UPDASP a project coordination unit ......
withrj1
 
MOVIE RECOMMENDATION SYSTEM, UDUMULA GOPI REDDY, Y24MC13085.pptx
MOVIE RECOMMENDATION SYSTEM, UDUMULA GOPI REDDY, Y24MC13085.pptx
Maharshi Mallela
 
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
Enable Your Cloud Journey With Microsoft Trusted Partner | IFI Tech
IFI Techsolutions
 
Automated Migration of ESRI Geodatabases Using XML Control Files and FME
Automated Migration of ESRI Geodatabases Using XML Control Files and FME
Safe Software
 

Php workshop L02 php basics

  • 3. Before we start By: Mohammad Al-Shalabi & Mohammad Opada Al-Bosh http://www.aptana.com/products/studio3/download Wampserver http://www.wampserver.com/en/
  • 4. By: Mohammad Al-Shalabi & Mohammad Opada Al-Bosh Lesson 1 Overview: Control statements Functions Loops Arrays4 3 2 1
  • 5. By: Mohammad Al-Shalabi & Mohammad Opada Al-Bosh Control Statements •If if (condition) { code to be executed if condition is true; } •Example $Successful=true; if ($Successful==true) { echo "Have a good day!"; }
  • 6. By: Mohammad Al-Shalabi & Mohammad Opada Al-Bosh Control Statements •If else if (condition) { code to be executed if condition is true;} else { code to be executed if condition is false; } •Example $Successful=true; if ($Successful===true) {echo "Have a good day!"; } else { echo "Have a work day!"; }
  • 7. By: Mohammad Al-Shalabi & Mohammad Opada Al-Bosh Loops •While while (condition is true) { code to be executed; } •Example $x=1; while($x<=5) { echo "The number is: $x <br>"; $x++; }
  • 8. By: Mohammad Al-Shalabi & Mohammad Opada Al-Bosh Loops •For for (init counter; test counter; increment counter) { code to be executed; } •Example for ($x=0; $x<=10; $x++) { echo ‘<p align=“center”The number is: ‘.$x.’ <br>’; }
  • 9. By: Mohammad Al-Shalabi & Mohammad Opada Al-Bosh Loops •Foreach foreach ($array as $value) { code to be executed; } •Example $colors = array("red","green","blue","yellow"); foreach ($colors as $value) { echo "$value <br>"; }
  • 10. By: Mohammad Al-Shalabi & Mohammad Opada Al-Bosh Function •Function function functionName() { code to be executed; } •Example function writeMsg() { echo "Hello world!"; } writeMsg();
  • 11. By: Mohammad Al-Shalabi & Mohammad Opada Al-Bosh Function •Function Arguments function writeMsg($Msg) { echo $Msg; } •Example writeMsg("Hello world! ");
  • 12. By: Mohammad Al-Shalabi & Mohammad Opada Al-Bosh Arrays •Arrays $fruits=array( "apple", "banana“ ); $fruits[2]="orange"; •Example $fruits[0] is "apple" $fruits[1] is "banana" $fruits[2] is "orange"
  • 13. By: Mohammad Al-Shalabi & Mohammad Opada Al-Bosh Arrays •Arrays $age=array( "mohammad"=>"22","opada"=>"25" ,"ahmad"=>"43“ ); •Example $age["mohammad"] is "22" $age["opada"] is "22" $age["ahmad"] is "43"