Day 1 PHP Introduction Geshan Manandhar Developer, Young Innovations Pvt. Limited www.geshanmanandhar.com
What is PHP PHP, which stands for “PHP: Hypertext Preprocessor”. PHP is a widely-used Open Source general-purpose scripting language. It is especially suited for Web development and can be embedded into HTML. It was originally created by Rasmus Lerdorf in 1995.
More About PHP PHP is free software released under the PHP License. PHP typically runs on a web server that takes PHP as input and gives out HTML pages as output. PHP is installed on more than 20 million websites and 1 million web servers. PHP has a syntax similar to C and Java. The current version of PHP is 5.2.x.
Features of PHP It is Free and Open source. Easy to learn but hard to master. Connects with 20+ databases. Version 5+ supports OOP. Multi-platform compatible.
The LAMP Stack Apache is the web server. MYSQL is the database server. PHP is the backend coding language.
PHP Trend
What will you learn
Software required to run PHP on Windows XAMPP X- for all platforms (windows, linux…) A- Apache web server M- MYSQL with PHPMyAdmin P- PHP P- Perl That’s all you need you must have good IDE to code.
IDEs for PHP development IDE – Integrated Development Environment Adobe Dreameweaver Notepad++ Zend Development Studio PHP Eclipse
Ways to code your PHP website or web Application Source: http://geshan.blogspot.com
Basic PHP Program Hello world X:\xampp\htdocs\my_folder\first_prog.php <?php //starting delimeter echo “Hello world”; //print hello world ?> Add some complication: <?php $message = “Hello world”; print $message; ?>
Delimiter, tags and comments <?php //php code ?> - long tag <? ?> - short tag <% %> - ASP style not preferred <script language=&quot;php&quot;>         //php tag     </script> - uncommon <?= ?> - shortcut for echo //line comment /* block comment */
PHP Data Types Boolean Integer Float String Array Objects
Another simple program Simple price calculation <?php $qty = 5; $price = 10000; $amt = $qty*$price; echo “Rs. “.number_format($amt, 2); ?>
Lets Install XAMPP Lets install XAMPP and run 2 programs Ask questions.

01 Php Introduction

  • 1.
    Day 1 PHPIntroduction Geshan Manandhar Developer, Young Innovations Pvt. Limited www.geshanmanandhar.com
  • 2.
    What is PHPPHP, which stands for “PHP: Hypertext Preprocessor”. PHP is a widely-used Open Source general-purpose scripting language. It is especially suited for Web development and can be embedded into HTML. It was originally created by Rasmus Lerdorf in 1995.
  • 3.
    More About PHPPHP is free software released under the PHP License. PHP typically runs on a web server that takes PHP as input and gives out HTML pages as output. PHP is installed on more than 20 million websites and 1 million web servers. PHP has a syntax similar to C and Java. The current version of PHP is 5.2.x.
  • 4.
    Features of PHPIt is Free and Open source. Easy to learn but hard to master. Connects with 20+ databases. Version 5+ supports OOP. Multi-platform compatible.
  • 5.
    The LAMP StackApache is the web server. MYSQL is the database server. PHP is the backend coding language.
  • 6.
  • 7.
  • 8.
    Software required torun PHP on Windows XAMPP X- for all platforms (windows, linux…) A- Apache web server M- MYSQL with PHPMyAdmin P- PHP P- Perl That’s all you need you must have good IDE to code.
  • 9.
    IDEs for PHPdevelopment IDE – Integrated Development Environment Adobe Dreameweaver Notepad++ Zend Development Studio PHP Eclipse
  • 10.
    Ways to codeyour PHP website or web Application Source: http://geshan.blogspot.com
  • 11.
    Basic PHP ProgramHello world X:\xampp\htdocs\my_folder\first_prog.php <?php //starting delimeter echo “Hello world”; //print hello world ?> Add some complication: <?php $message = “Hello world”; print $message; ?>
  • 12.
    Delimiter, tags andcomments <?php //php code ?> - long tag <? ?> - short tag <% %> - ASP style not preferred <script language=&quot;php&quot;>         //php tag     </script> - uncommon <?= ?> - shortcut for echo //line comment /* block comment */
  • 13.
    PHP Data TypesBoolean Integer Float String Array Objects
  • 14.
    Another simple programSimple price calculation <?php $qty = 5; $price = 10000; $amt = $qty*$price; echo “Rs. “.number_format($amt, 2); ?>
  • 15.
    Lets Install XAMPP Lets install XAMPP and run 2 programs Ask questions.