SlideShare a Scribd company logo
Basic Syntax , Comment & Echo /
Print Statement in PHP
Part-II
Presented By: Sidrah Altaf
Vocational Training Centre Saddar Karachi
PHP Tags:
Canonical PHP tags:
The most universally effective PHP tag style is:
<?php
Content goes here….
?>
PHP Tags:
Short open (SGML-style) tags:
If you use this style, you can be positive that your tags will always be
correctly interpreted.
<?
Content goes here….
?>
PHP Tags:
ASP Style tags:
ASP-style tags mimic the tags used by Active Server Pages to delineate
code blocks. ASP- style tags look like this:
<%
PHP Content goes here….
%>
PHP Tags:
HTML Style tags:
HTML script tags look like this:
<script language=“PHP”>
PHP Content goes here….
</script>
PHP Comments:
A comment is the portion of a program that exists only for the
human reader and stripped out before displaying the
programs result. There are two commenting formats in PHP:
 Single Line Comment
 Multi Line Comment
Single Line Comments:
They are generally used for short explanations or notes
relevant to the local code. Here are the examples of single line
comments.
<?php
// This is single line comment
?>
Multi Line Comments:
They are generally used to provide pseudo code algorithms and more
detailed explanations when necessary. The multiline style of
commenting is the same as in C. Here are the example of multi lines
comments.
<?php
/*
This is
Multi line comment
*/
?>
PHP is White space in-sensitive:
 Whitespace is the stuff you type that is typically invisible on
the screen, including spaces, tabs, and carriage returns
(end-of-line characters).
 PHP whitespace insensitive means that it almost never
matters how many whitespace characters you have in a
row.one whitespace character is the same as many such
characters.
PHP is case-sensitive:
 Normally PHP is a case-sensitive language. But in
PHP, all keywords for e.g. (if, else, while,
echo),classes , functions, are not case sensitive.
First PHP Code (Echo Statement):
First PHP Code (Print Statement):
THANK YOU

More Related Content

What's hot (20)

PPT
Control structure
Samsil Arefin
 
PPT
Operators in C Programming
programming9
 
PDF
Python - gui programming (tkinter)
Learnbay Datascience
 
PPTX
OOP Introduction with java programming language
Md.Al-imran Roton
 
PPT
Visual programming lecture
AqsaHayat3
 
PPTX
Introduction to programming
Neeru Mittal
 
PPTX
Oop c++class(final).ppt
Alok Kumar
 
PPT
Functions in C++
Mohammed Sikander
 
PPTX
Translators(Compiler, Assembler) and interpreter
baabtra.com - No. 1 supplier of quality freshers
 
PPT
friend function(c++)
Ritika Sharma
 
PPTX
Array in c++
Mahesha Mano
 
PPTX
Array Introduction One-dimensional array Multidimensional array
imtiazalijoono
 
PPTX
Dynamic memory allocation in c
lavanya marichamy
 
PPTX
Basic Concepts of OOPs (Object Oriented Programming in Java)
Michelle Anne Meralpis
 
PPT
Instruction Set Architecture (ISA)
Gaditek
 
PPT
Object-oriented concepts
BG Java EE Course
 
PPT
Function overloading(c++)
Ritika Sharma
 
PPT
PHP - DataType,Variable,Constant,Operators,Array,Include and require
TheCreativedev Blog
 
PDF
Object oriented programming c++
Ankur Pandey
 
Control structure
Samsil Arefin
 
Operators in C Programming
programming9
 
Python - gui programming (tkinter)
Learnbay Datascience
 
OOP Introduction with java programming language
Md.Al-imran Roton
 
Visual programming lecture
AqsaHayat3
 
Introduction to programming
Neeru Mittal
 
Oop c++class(final).ppt
Alok Kumar
 
Functions in C++
Mohammed Sikander
 
Translators(Compiler, Assembler) and interpreter
baabtra.com - No. 1 supplier of quality freshers
 
friend function(c++)
Ritika Sharma
 
Array in c++
Mahesha Mano
 
Array Introduction One-dimensional array Multidimensional array
imtiazalijoono
 
Dynamic memory allocation in c
lavanya marichamy
 
Basic Concepts of OOPs (Object Oriented Programming in Java)
Michelle Anne Meralpis
 
Instruction Set Architecture (ISA)
Gaditek
 
Object-oriented concepts
BG Java EE Course
 
Function overloading(c++)
Ritika Sharma
 
PHP - DataType,Variable,Constant,Operators,Array,Include and require
TheCreativedev Blog
 
Object oriented programming c++
Ankur Pandey
 

Similar to PHP Syntax & Comments (20)

PDF
Php tutorial
vigneswaran54
 
PDF
Php tutorial
sushil kumar
 
PDF
Php tutorial
Nguyễn Hoà
 
PDF
Php tutorial
Niit
 
DOCX
PHP.docx
NithiyaNithi2
 
PPT
Overview of php
Tabeer12
 
PDF
Php introduction
krishnapriya Tadepalli
 
PPTX
Php and MySQL final year bca notes for bca.pptx
AJAYKUMAR34368
 
PPT
PHP - Introduction to PHP Fundamentals
Vibrant Technologies & Computers
 
PDF
Basic php
salissal
 
PPTX
Introduction to-php
AhmedAElHalimAhmed
 
PPT
Php mysql
Shehrevar Davierwala
 
PDF
Php notes 01
Aakaash Ngl
 
PDF
PHP Basic & Variables
M.Zalmai Rahmani
 
PPTX
Php unit i
BagavathiLakshmi
 
PPTX
Chap1introppt1php basic
monikadeshmane
 
PDF
Php
Vineet Vats
 
PDF
Php tizag tutorial
PrinceGuru MS
 
PDF
Php tizag tutorial
jaggu536
 
Php tutorial
vigneswaran54
 
Php tutorial
sushil kumar
 
Php tutorial
Nguyễn Hoà
 
Php tutorial
Niit
 
PHP.docx
NithiyaNithi2
 
Overview of php
Tabeer12
 
Php introduction
krishnapriya Tadepalli
 
Php and MySQL final year bca notes for bca.pptx
AJAYKUMAR34368
 
PHP - Introduction to PHP Fundamentals
Vibrant Technologies & Computers
 
Basic php
salissal
 
Introduction to-php
AhmedAElHalimAhmed
 
Php notes 01
Aakaash Ngl
 
PHP Basic & Variables
M.Zalmai Rahmani
 
Php unit i
BagavathiLakshmi
 
Chap1introppt1php basic
monikadeshmane
 
Php tizag tutorial
PrinceGuru MS
 
Php tizag tutorial
jaggu536
 
Ad

More from Sidrah Noor (12)

PPTX
World wide web An Introduction
Sidrah Noor
 
PPTX
Introduction To PHP (Operators)
Sidrah Noor
 
PPTX
Introduction To PHP (Variables & Data types)
Sidrah Noor
 
PPTX
Introduction to PHP Part-I
Sidrah Noor
 
PDF
Advantages And Disadvantages of Using Computer
Sidrah Noor
 
PDF
Uses of computer in Different Fields
Sidrah Noor
 
PDF
Introduction To Information Technology
Sidrah Noor
 
PPTX
Adobe Photoshop Toolbar Introduction
Sidrah Noor
 
PPSX
Introduction to web developments
Sidrah Noor
 
PPSX
Types of websites
Sidrah Noor
 
PPSX
Introduction to Information Technology
Sidrah Noor
 
PPSX
Printers
Sidrah Noor
 
World wide web An Introduction
Sidrah Noor
 
Introduction To PHP (Operators)
Sidrah Noor
 
Introduction To PHP (Variables & Data types)
Sidrah Noor
 
Introduction to PHP Part-I
Sidrah Noor
 
Advantages And Disadvantages of Using Computer
Sidrah Noor
 
Uses of computer in Different Fields
Sidrah Noor
 
Introduction To Information Technology
Sidrah Noor
 
Adobe Photoshop Toolbar Introduction
Sidrah Noor
 
Introduction to web developments
Sidrah Noor
 
Types of websites
Sidrah Noor
 
Introduction to Information Technology
Sidrah Noor
 
Printers
Sidrah Noor
 
Ad

Recently uploaded (20)

PPTX
How to Set Maximum Difference Odoo 18 POS
Celine George
 
PDF
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
PDF
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
PDF
The Different Types of Non-Experimental Research
Thelma Villaflores
 
PPTX
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
PDF
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
PPTX
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
PPT
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
PDF
CHILD RIGHTS AND PROTECTION QUESTION BANK
Dr Raja Mohammed T
 
PDF
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
PPTX
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
PPTX
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
PDF
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
PDF
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
PPTX
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
PPTX
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
PDF
Dimensions of Societal Planning in Commonism
StefanMz
 
PPSX
Health Planning in india - Unit 03 - CHN 2 - GNM 3RD YEAR.ppsx
Priyanshu Anand
 
PPTX
PPT on the Development of Education in the Victorian England
Beena E S
 
PDF
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 
How to Set Maximum Difference Odoo 18 POS
Celine George
 
0725.WHITEPAPER-UNIQUEWAYSOFPROTOTYPINGANDUXNOW.pdf
Thomas GIRARD, MA, CDP
 
People & Earth's Ecosystem -Lesson 2: People & Population
marvinnbustamante1
 
The Different Types of Non-Experimental Research
Thelma Villaflores
 
How to Manage Large Scrollbar in Odoo 18 POS
Celine George
 
LAW OF CONTRACT ( 5 YEAR LLB & UNITARY LLB)- MODULE-3 - LEARN THROUGH PICTURE
APARNA T SHAIL KUMAR
 
HYDROCEPHALUS: NURSING MANAGEMENT .pptx
PRADEEP ABOTHU
 
Talk on Critical Theory, Part II, Philosophy of Social Sciences
Soraj Hongladarom
 
CHILD RIGHTS AND PROTECTION QUESTION BANK
Dr Raja Mohammed T
 
SSHS-2025-PKLP_Quarter-1-Dr.-Kerby-Alvarez.pdf
AishahSangcopan1
 
2025 Winter SWAYAM NPTEL & A Student.pptx
Utsav Yagnik
 
Views on Education of Indian Thinkers Mahatma Gandhi.pptx
ShrutiMahanta1
 
The Constitution Review Committee (CRC) has released an updated schedule for ...
nservice241
 
ARAL-Orientation_Morning-Session_Day-11.pdf
JoelVilloso1
 
STAFF DEVELOPMENT AND WELFARE: MANAGEMENT
PRADEEP ABOTHU
 
Growth and development and milestones, factors
BHUVANESHWARI BADIGER
 
Dimensions of Societal Planning in Commonism
StefanMz
 
Health Planning in india - Unit 03 - CHN 2 - GNM 3RD YEAR.ppsx
Priyanshu Anand
 
PPT on the Development of Education in the Victorian England
Beena E S
 
Generative AI: it's STILL not a robot (CIJ Summer 2025)
Paul Bradshaw
 

PHP Syntax & Comments

  • 1. Basic Syntax , Comment & Echo / Print Statement in PHP Part-II Presented By: Sidrah Altaf Vocational Training Centre Saddar Karachi
  • 2. PHP Tags: Canonical PHP tags: The most universally effective PHP tag style is: <?php Content goes here…. ?>
  • 3. PHP Tags: Short open (SGML-style) tags: If you use this style, you can be positive that your tags will always be correctly interpreted. <? Content goes here…. ?>
  • 4. PHP Tags: ASP Style tags: ASP-style tags mimic the tags used by Active Server Pages to delineate code blocks. ASP- style tags look like this: <% PHP Content goes here…. %>
  • 5. PHP Tags: HTML Style tags: HTML script tags look like this: <script language=“PHP”> PHP Content goes here…. </script>
  • 6. PHP Comments: A comment is the portion of a program that exists only for the human reader and stripped out before displaying the programs result. There are two commenting formats in PHP:  Single Line Comment  Multi Line Comment
  • 7. Single Line Comments: They are generally used for short explanations or notes relevant to the local code. Here are the examples of single line comments. <?php // This is single line comment ?>
  • 8. Multi Line Comments: They are generally used to provide pseudo code algorithms and more detailed explanations when necessary. The multiline style of commenting is the same as in C. Here are the example of multi lines comments. <?php /* This is Multi line comment */ ?>
  • 9. PHP is White space in-sensitive:  Whitespace is the stuff you type that is typically invisible on the screen, including spaces, tabs, and carriage returns (end-of-line characters).  PHP whitespace insensitive means that it almost never matters how many whitespace characters you have in a row.one whitespace character is the same as many such characters.
  • 10. PHP is case-sensitive:  Normally PHP is a case-sensitive language. But in PHP, all keywords for e.g. (if, else, while, echo),classes , functions, are not case sensitive.
  • 11. First PHP Code (Echo Statement):
  • 12. First PHP Code (Print Statement):