Your SlideShare is downloading. ×
Php
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Php

2,597
views

Published on

Published in: Technology

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
2,597
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
71
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. What is PHP?
    • PHP stands for PHP: Hypertext Preprocessor
    • 2. PHP is a server-side scripting language, like ASP
    • 3. PHP scripts are executed on the server
    • 4. PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.)
    • 5. PHP is an open source software
    • 6. PHP is free to download and use
  • What is a PHP File?
    • PHP files can contain text, HTML tags and scripts
    • 7. PHP files are returned to the browser as plain HTML 
    • 8. PHP files have a file extension of ".php", ".php3", or ".phtml"
  • What is MySQL?
    • MySQL is a database server
    • 9. MySQL is ideal for both small and large applications
    • 10. MySQL supports standard SQL
    • 11. MySQL compiles on a number of platforms
    • 12. MySQL is free to download and use
  • Why PHP?
    • PHP runs on different platforms (Windows, Linux, Unix, etc.)
    • 13. PHP is compatible with almost all servers used today (Apache, IIS, etc.)
    • 14. PHP is FREEWARE.
    • 15. PHP is easy to learn and runs efficiently on the server side
  • Basic PHP Syntax
    First Program to display Hello World
    <?phpecho "Hello World";?>
    Declaring Comments<?php//This is a comment Single-line comment entry
    /* Multi-line comment entryThis isa commentblock*/?>
  • 16. Variables in PHP
    • Variables are used for storing a values, like text strings, numbers or arrays.
    • 17. All variables in PHP start with a $ sign symbol.
    $var_name = value;
    • PHP is a Loosely Typed Language
  • Naming Rules for Variables
    • A variable name must start with a letter or an underscore "_"
    • 18. A variable name can only contain alpha-numeric characters and underscores (a-z, A-Z, 0-9, and _ )
    • 19. A variable name should not contain spaces. If a variable name is more than one word, it should be separated with an underscore ($my_string), or with capitalization ($myString)
  • String Functions and Operators
    • The Concatenation Operator
    The concatenation operator (.)  is used to put two string values together.
    <?php$txt1="Hello World!";$txt2="What a nice day!";echo $txt1 . " " . $txt2;?>
  • 20.
    • The strlen() function
    The strlen() function is used to return the length of a string.
    <?phpecho strlen("Hello world!");?>
  • 21.
    • The strpos() function
    The strpos() function is used to search for character within a string.
    <?phpecho strpos("Hello world!","world");?>
  • 22. PHP Operators
    • Arithmetic Operators
    • Assignment Operators
    • Comparison Operators
    • Logical Operators