PHP Tutorial with XAMPP for Windows
Introduction
PHP is a powerful tool for making dynamic and interactive Web pages. It is the widely-used, free, and efficient alternative to competitors such as Microsoft's ASP and other scripting languages. In our tutorial you will learn about PHP, and how to execute scripts on your server. XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use - just download, extract and start. What is PHP?
Why PHP?
How to Run a PHP file using XAMPP?
Basic PHP Syntax A PHP scripting block always starts with and ends with ?>. A PHP scripting block can be placed anywhere in the document. Example: PHP Code:
A PHP file normally contains HTML tags, Javascript and PHP scripting code. Example: PHP Code:
Note: The file must have a .php or .php3 extension else the PHP code will not be executed. Comments in PHP
PHP Code:
Variable Declarations in PHP Variables are used for storing a values, like text strings, numbers or arrays. In PHP, a variable does not need to be declared before adding a value to it and no data type needed, PHP will automatically converts the variable to the correct data type, depending on its value. PHP variables are start with a $ sign symbol. Example: PHP Code:
Naming Rules for PHP Variables
PHP Code:
|
All times are GMT +2. The time now is 16:31. |
Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.