You are on page 1of 10

PRESENTATION ON

submitted by

Ms. ROSEMELYNE WARTDE


Roll-no:L-14229
Sem:6TH/2017

DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING

INDO GLOBAL COLLEGE OF ENGINEERING


CONTENTS

• Introduction
• Uses of PHP
• PHP File
• PHP Syntax
• Echo Function
• Comment in PHP
INTRODUCTION
• What is PHP?
• PHP stands for PHP Hypertext Preprocessor.
• It is a server sites scripting language for making dynamic and interactive
webpages.
• It was created by RasmusLerdorf in 1994.
USES OF PHP

• PHP can generated dynamic page contents.


• PHP performs system functions.
• PHP can handle forms.
• add, delete, modify elements within your database.
• Access cookies variables and set cookies.
PHP FILE

• PHP file can contain text, html, java script, etc.


• PHP code are executed on the server.
• The default file is .php
PHP SYNTAX

• Can be placed anywhere in the document.


• Syntax:
<?php
//php code goes here
?>
• Php statement ends with a semicolon (;).
ECHO FUNCTION
• Display message on the screen
• Syntax:
Echo “message”;
Or
Echo(“message”);

• example:Sample.php
<?php
echo (“Hello World!”);
?>
Output: Hello World!
COMMENT IN PHP
• 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 comments:
• Example- #this is a single line comment.
// this is a single line comment
• Multi line comment:
• Example- /*
this is a multi line comment
used in php
*/
• Example1: Sample.php
<?php
//echo (‘Hello World!’);
echo (‘Hello World!’);
?>

• Example2:sample.php
<?php
/*
Learning php is very interesting
I am enjoying
echo (‘Happy!Happy!’);
*/
?>
THANK YOU

You might also like