PHP Presentation

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 16

A

PRESENTATION
ON PHP

BY DIVYA
INTRODUCTION TO HTML

 HTML stands for hyper text markup


language.
 HTML is used to create web pages and web
applications.It is provide structure for the
web pages.
 HTML elements are reprsented by tags.
 File extention-.html
 HTML describe the structure of web page.
Syntex of html:-

<html>
<head>
<tittle></tittle>
</head>
<body>
</body>
</html>
HTML tags

 HTML tags normally written in pairs like <p>


and </p>.
 The first tag in the pair is known as start tag,
the second tag is the end tag.
 HTML tags are hidden keywords within a web
that define how your web browser must
format and display the content.
 Each tags has its own function.
Cascading style sheet(CSS)

 CSS stands for cascading style sheet.


 It describes the how html elements are to be
displayed on screen, paper or in other media.
 CSS saves a lot of work. it can control the lay
out of multiple web pages all at once.
 External style sheets are stored in CSS file.
 It can control the layout of web pages all at
once.
Types of css:

 Internal style sheet-internal CSS is used in the


condition when want a style to be used in the
complete html.
 Inline style sheet-for inline CSS every style
content is an html elements.it is used for a
limited section .
 External style sheet-external CSS we create a
CSS file and use it in our html page as per
requirments.
JAVA script

 JAVA script is programming language of html


and web.
 JAVA script is client side scripting language.
 JAVA script makes html page more dynamic
and interactive.
 It is easy to learn.
 JAVA script accepts both double and single
quotes.
Introduction to j-query

 J-query is java script library.


 J-query greatly simplifies java scriupt
programming.
 J- query to learn.
 J-query is a open source software.
 J-query is a client side scripting of html.
 J-query is combination of three languages:
HTML,CSS and JAVA script.
Introduction to PHP

 PHP originally stood for personal home page.


 PHP stands for hypertext preprocessor.
 PHP is combination of three language:-
CSS,HTML and JAVA script.
 PHP is widely used open source scripting
language.
 PHP is free download and use.
 PHP script are executed in the server.
 Extention of PHP is .php
Basic php syntax:

 A php script can be placed anywhere in the


document.
 A php script starts with <php and ends with
?>
<php
// php codegoes here
?>
Comments in PHP
 A comment in PHP code is a file that is not
read/executed as part of the program . its
only purpose is to be read by someone who is
looking at the code.
Comments :
1. Single line comment
// and # is used to single line comment.
2. Multiline comment
this comment start with /* and ends with */
PHP switch statement
 The switch statement is used to perform different
actions based on different conditions.
syntax:
Switch(expression/value)
{
Case label 1:
Code to be executed
Break;
Case label n:
Code to be executed
Break;
Default:
Code to be executed if n is different from all labels;
}
PHP for loop

 The for loop statement is used when you know


have many time you want to a statement or a
block of statements.

syntex:

for (initialization; condition; increment)


{
code to be executed;
}
Array in PHP

 Array is the collection of similer type of data elements.


 An array stores multiple values in one single variable.
 An array is a special variable, which can hold more then
one value at a time.
Types of array:
1. Indexed array:-array with a numeric index.
2. Associative array:-associative array are arrays that use
naned keys that you assigen to them.
3. Multidimentional array:-an array containing one or
more array.
What is a function?
• A function is a reusable piece or block of code that performs a specific
action.
• Function can either return values when called or can simply perform an
operation without returning any value .
• PHP has over 700 function built in that perform different tasks.

Why use function?


• Better code organization- function allow us to group blocks of related
code that perform a specific task together.
• Reusability- once defined , a function can be called by a number of scripts
in our PHP files . this save us time of reinventing the wheel when we want to
perform some routine tasks such as connecting to the database.
• Easy maintenance- updates to the system only need to be made in one
place.
.

 Built in functions
1. Built in function can be classified into many catagories . below is the list of
the categories .
• String function
these are functions that manipulate string data , refer to the article
on strings for implementation examples of string function.
• Numeric functions
1. numeric function are function that returns numeric results
2. numeric PHP function can be used to format numbers , return
constants , perform mathematical computations etc.
• Date function
1. the date function is used to format date and time to human
readable format .
2. check the article on PHP date functions for more details.

You might also like