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!

More Related Content

What's hot (19)

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

Similar to Php workshop L02 php basics (20)

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

More from Mohammad Tahsin Alshalabi (14)

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

Recently uploaded (20)

PPTX
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
 
PDF
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
PDF
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
PDF
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
PPTX
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
PDF
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
PDF
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
PDF
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PDF
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
PDF
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
PDF
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
PPTX
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
PDF
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
PDF
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
PPTX
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
PDF
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
PPTX
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
PDF
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 
Transforming Mining & Engineering Operations with Odoo ERP | Streamline Proje...
SatishKumar2651
 
유니티에서 Burst Compiler+ThreadedJobs+SIMD 적용사례
Seongdae Kim
 
Why Businesses Are Switching to Open Source Alternatives to Crystal Reports.pdf
Varsha Nayak
 
AI + DevOps = Smart Automation with devseccops.ai.pdf
Devseccops.ai
 
Home Care Tools: Benefits, features and more
Third Rock Techkno
 
Download Canva Pro 2025 PC Crack Full Latest Version
bashirkhan333g
 
SciPy 2025 - Packaging a Scientific Python Project
Henry Schreiner
 
4K Video Downloader Plus Pro Crack for MacOS New Download 2025
bashirkhan333g
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
Automate Cybersecurity Tasks with Python
VICTOR MAESTRE RAMIREZ
 
HiHelloHR – Simplify HR Operations for Modern Workplaces
HiHelloHR
 
Driver Easy Pro 6.1.1 Crack Licensce key 2025 FREE
utfefguu
 
OpenChain @ OSS NA - In From the Cold: Open Source as Part of Mainstream Soft...
Shane Coughlan
 
MiniTool Partition Wizard Free Crack + Full Free Download 2025
bashirkhan333g
 
Linux Certificate of Completion - LabEx Certificate
VICTOR MAESTRE RAMIREZ
 
Empowering Asian Contributions: The Rise of Regional User Groups in Open Sour...
Shane Coughlan
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
Unlock Efficiency with Insurance Policy Administration Systems
Insurance Tech Services
 
Finding Your License Details in IBM SPSS Statistics Version 31.pptx
Version 1 Analytics
 
MiniTool Partition Wizard 12.8 Crack License Key LATEST
hashhshs786
 

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"