What is PHP?<br /><ul><li>PHP stands for PHP: Hypertext Preprocessor
PHP is a server-side scripting language, like ASP
PHP scripts are executed on the server
PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.)
PHP is an open source software
PHP is free to download and use</li></li></ul><li>What is a PHP File?<br /><ul><li>PHP files can contain text, HTML tags a...
PHP files are returned to the browser as plain HTML 
PHP files have a file extension of ".php", ".php3", or ".phtml"</li></li></ul><li>What is MySQL?<br /><ul><li>MySQL is a d...
MySQL is ideal for both small and large applications
MySQL supports standard SQL
MySQL compiles on a number of platforms
MySQL is free to download and use</li></li></ul><li>Why PHP?<br /><ul><li>PHP runs on different platforms (Windows, Linux,...
PHP is compatible with almost all servers used today (Apache, IIS, etc.)
PHP is FREEWARE.
Upcoming SlideShare
Loading in …5
×

Php

2,719
-1

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

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

No notes for slide

Php

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

×