SlideShare una empresa de Scribd logo
1 de 17
Vibrant Technologies
& Computers
Php&mysql COURSE
Make Career With Us!!
B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
phptraining.vibranttechnologies.co.in
enquiry@vibrantgroup.co.in
phptraining.vibranttechnologies.co.in
 PHP == ‘Hypertext Preprocessor’
 Open-source, server-side scripting language
 Used to generate dynamic web-pages
 PHP scripts reside between reserved PHP tags
 This allows the programmer to embed PHP
scripts within HTML pages
What is PHP?
B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
phptraining.vibranttechnologies.co.in
enquiry@vibrantgroup.co.in
phptraining.vibranttechnologies.co.in
What is PHP (cont’d)
 Interpreted language, scripts are parsed at run-
time rather than compiled beforehand
 Executed on the server-side
 Source-code not visible by client
 ‘View Source’ in browsers does not display the PHP
code
 Various built-in functions allow for fast
development
 Compatible with many popular databases
B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
phptraining.vibranttechnologies.co.in
enquiry@vibrantgroup.co.in
phptraining.vibranttechnologies.co.in
What does PHP code look
like?
 Structurally similar to C/C++
 Supports procedural and object-oriented
paradigm (to some degree)
 All PHP statements end with a semi-colon
 Each PHP script must be enclosed in the
reserved PHP tag
<?php
…
?>
B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
phptraining.vibranttechnologies.co.in
enquiry@vibrantgroup.co.in
phptraining.vibranttechnologies.co.in
Comments in PHP
 Standard C, C++, and shell comment
symbols
// C++ and Java-style comment
# Shell-style comments
/* C-style comments
These can span multiple lines */
B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
phptraining.vibranttechnologies.co.in
enquiry@vibrantgroup.co.in
phptraining.vibranttechnologies.co.in
Variables in PHP
 PHP variables must begin with a “$” sign
 Case-sensitive ($Foo != $foo != $fOo)
 Global and locally-scoped variables
 Global variables can be used anywhere
 Local variables restricted to a function or class
 Certain variable names reserved by PHP
 Form variables ($_POST, $_GET)
 Server variables ($_SERVER)
 Etc.
B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
phptraining.vibranttechnologies.co.in
enquiry@vibrantgroup.co.in
phptraining.vibranttechnologies.co.in
Variable usage
<?php
$foo = 25; // Numerical variable
$bar = “Hello”; // String variable
$foo = ($foo * 7); // Multiplies foo by 7
$bar = ($bar * 7); // Invalid expression
?>
B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
phptraining.vibranttechnologies.co.in
enquiry@vibrantgroup.co.in
phptraining.vibranttechnologies.co.in
Echo
 The PHP command „echo‟ is used to
output the parameters passed to it
 The typical usage for this is to send data to the
client‟s web-browser
 Syntax
 void echo (string arg1 [, string argn...])
 In practice, arguments are not passed in
parentheses since echo is a language
construct rather than an actual function
B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
phptraining.vibranttechnologies.co.in
enquiry@vibrantgroup.co.in
phptraining.vibranttechnologies.co.in
Concatenation
 Use a period to join strings into one.
<?php
$string1=“Hello”;
$string2=“PHP”;
$string3=$string1 . “ ” . $string2;
Print $string3;
?>
Hello PHP
B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
phptraining.vibranttechnologies.co.in
enquiry@vibrantgroup.co.in
phptraining.vibranttechnologies.co.in
Escaping the Character
 If the string has a set of double quotation
marks that must remain visible, use the 
[backslash] before the quotation marks to
ignore and display them.
<?php
$heading=“”Computer Science””;
Print $heading;
?>
“Computer Science”
B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
phptraining.vibranttechnologies.co.in
enquiry@vibrantgroup.co.in
phptraining.vibranttechnologies.co.in
PHP Control Structures
 Control Structures: Are the structures within a language that
allow us to control the flow of execution through a program or
script.
 Grouped into conditional (branching) structures (e.g. if/else) and
repetition structures (e.g. while loops).
 Example if/else if/else statement:
if ($foo == 0) {
echo „The variable foo is equal to 0‟;
}
else if (($foo > 0) && ($foo <= 5)) {
echo „The variable foo is between 1 and 5‟;
}
else {
echo „The variable foo is equal to „.$foo;
}
B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
phptraining.vibranttechnologies.co.in
enquiry@vibrantgroup.co.in
phptraining.vibranttechnologies.co.in
If ... Else...
 If (condition)
{
Statements;
}
Else
{
Statement;
}
<?php
If($user==“John”)
{
Print “Hello John.”;
}
Else
{
Print “You are not John.”;
}
?>
B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
phptraining.vibranttechnologies.co.in
enquiry@vibrantgroup.co.in
phptraining.vibranttechnologies.co.in
While Loops
 While (condition)
{
Statements;
}
<?php
$count=0;
While($count<3)
{
Print “hello PHP. ”;
$count += 1;
// $count = $count + 1;
// or
// $count++;
?>
hello PHP. hello PHP. hello PHP.
B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
phptraining.vibranttechnologies.co.in
enquiry@vibrantgroup.co.in
phptraining.vibranttechnologies.co.in
Date Display
$datedisplay=date(“yyyy/m/d”);
Print $datedisplay;
# If the date is April 1st, 2009
# It would display as 2009/4/1
2009/4/1
$datedisplay=date(“l, F m, Y”);
Print $datedisplay;
# If the date is April 1st, 2009
# Wednesday, April 1, 2009
Wednesday, April 1, 2009
B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
phptraining.vibranttechnologies.co.in
enquiry@vibrantgroup.co.in
phptraining.vibranttechnologies.co.in
Month, Day & Date Format Symbols
M Jan
F January
m 01
n 1
Day of Month d 01
Day of Month J 1
Day of Week l Monday
Day of Week D Mon
B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
phptraining.vibranttechnologies.co.in
enquiry@vibrantgroup.co.in
phptraining.vibranttechnologies.co.in
Functions
 Functions MUST be defined before then can be
called
 Function headers are of the format
 Note that no return type is specified
 Unlike variables, function names are not case
sensitive (foo(…) == Foo(…) == FoO(…))
B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
phptraining.vibranttechnologies.co.in
enquiry@vibrantgroup.co.in
phptraining.vibranttechnologies.co.in
Where to Get More Information
Vibrant Group:
www.vibrantgroup.co.in
Vibrant Technologies & Computers
www.vibranttechnologies.co.in/technologies.vibrantgroup.co.
in
Vibrant HR Team
www.hr.vibrangroup.co.in

Más contenido relacionado

Último

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).pptxVishalSingh1417
 
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
 
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
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
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 . pdfQucHHunhnh
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfChris Hunter
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
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
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
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
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.MateoGardella
 
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
 

Último (20)

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
 
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
 
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
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
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
 
Making and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdfMaking and Justifying Mathematical Decisions.pdf
Making and Justifying Mathematical Decisions.pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum 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
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
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
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
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...
 

Destacado

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

Destacado (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

Php mysql-course-navi-mumbai-php-mysql-course-provider-navi-mumbai

  • 1. Vibrant Technologies & Computers Php&mysql COURSE Make Career With Us!! B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173
  • 2. B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 phptraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in phptraining.vibranttechnologies.co.in  PHP == ‘Hypertext Preprocessor’  Open-source, server-side scripting language  Used to generate dynamic web-pages  PHP scripts reside between reserved PHP tags  This allows the programmer to embed PHP scripts within HTML pages What is PHP?
  • 3. B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 phptraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in phptraining.vibranttechnologies.co.in What is PHP (cont’d)  Interpreted language, scripts are parsed at run- time rather than compiled beforehand  Executed on the server-side  Source-code not visible by client  ‘View Source’ in browsers does not display the PHP code  Various built-in functions allow for fast development  Compatible with many popular databases
  • 4. B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 phptraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in phptraining.vibranttechnologies.co.in What does PHP code look like?  Structurally similar to C/C++  Supports procedural and object-oriented paradigm (to some degree)  All PHP statements end with a semi-colon  Each PHP script must be enclosed in the reserved PHP tag <?php … ?>
  • 5. B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 phptraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in phptraining.vibranttechnologies.co.in Comments in PHP  Standard C, C++, and shell comment symbols // C++ and Java-style comment # Shell-style comments /* C-style comments These can span multiple lines */
  • 6. B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 phptraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in phptraining.vibranttechnologies.co.in Variables in PHP  PHP variables must begin with a “$” sign  Case-sensitive ($Foo != $foo != $fOo)  Global and locally-scoped variables  Global variables can be used anywhere  Local variables restricted to a function or class  Certain variable names reserved by PHP  Form variables ($_POST, $_GET)  Server variables ($_SERVER)  Etc.
  • 7. B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 phptraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in phptraining.vibranttechnologies.co.in Variable usage <?php $foo = 25; // Numerical variable $bar = “Hello”; // String variable $foo = ($foo * 7); // Multiplies foo by 7 $bar = ($bar * 7); // Invalid expression ?>
  • 8. B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 phptraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in phptraining.vibranttechnologies.co.in Echo  The PHP command „echo‟ is used to output the parameters passed to it  The typical usage for this is to send data to the client‟s web-browser  Syntax  void echo (string arg1 [, string argn...])  In practice, arguments are not passed in parentheses since echo is a language construct rather than an actual function
  • 9. B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 phptraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in phptraining.vibranttechnologies.co.in Concatenation  Use a period to join strings into one. <?php $string1=“Hello”; $string2=“PHP”; $string3=$string1 . “ ” . $string2; Print $string3; ?> Hello PHP
  • 10. B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 phptraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in phptraining.vibranttechnologies.co.in Escaping the Character  If the string has a set of double quotation marks that must remain visible, use the [backslash] before the quotation marks to ignore and display them. <?php $heading=“”Computer Science””; Print $heading; ?> “Computer Science”
  • 11. B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 phptraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in phptraining.vibranttechnologies.co.in PHP Control Structures  Control Structures: Are the structures within a language that allow us to control the flow of execution through a program or script.  Grouped into conditional (branching) structures (e.g. if/else) and repetition structures (e.g. while loops).  Example if/else if/else statement: if ($foo == 0) { echo „The variable foo is equal to 0‟; } else if (($foo > 0) && ($foo <= 5)) { echo „The variable foo is between 1 and 5‟; } else { echo „The variable foo is equal to „.$foo; }
  • 12. B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 phptraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in phptraining.vibranttechnologies.co.in If ... Else...  If (condition) { Statements; } Else { Statement; } <?php If($user==“John”) { Print “Hello John.”; } Else { Print “You are not John.”; } ?>
  • 13. B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 phptraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in phptraining.vibranttechnologies.co.in While Loops  While (condition) { Statements; } <?php $count=0; While($count<3) { Print “hello PHP. ”; $count += 1; // $count = $count + 1; // or // $count++; ?> hello PHP. hello PHP. hello PHP.
  • 14. B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 phptraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in phptraining.vibranttechnologies.co.in Date Display $datedisplay=date(“yyyy/m/d”); Print $datedisplay; # If the date is April 1st, 2009 # It would display as 2009/4/1 2009/4/1 $datedisplay=date(“l, F m, Y”); Print $datedisplay; # If the date is April 1st, 2009 # Wednesday, April 1, 2009 Wednesday, April 1, 2009
  • 15. B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 phptraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in phptraining.vibranttechnologies.co.in Month, Day & Date Format Symbols M Jan F January m 01 n 1 Day of Month d 01 Day of Month J 1 Day of Week l Monday Day of Week D Mon
  • 16. B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 phptraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in phptraining.vibranttechnologies.co.in Functions  Functions MUST be defined before then can be called  Function headers are of the format  Note that no return type is specified  Unlike variables, function names are not case sensitive (foo(…) == Foo(…) == FoO(…))
  • 17. B2/6/2 Vashi ,Navi Mumbai, Contact:09892900103/9892900173 phptraining.vibranttechnologies.co.in enquiry@vibrantgroup.co.in phptraining.vibranttechnologies.co.in Where to Get More Information Vibrant Group: www.vibrantgroup.co.in Vibrant Technologies & Computers www.vibranttechnologies.co.in/technologies.vibrantgroup.co. in Vibrant HR Team www.hr.vibrangroup.co.in