PHP Tutorials List
In this course, we’ll explore the basic structure of PHP Scripting Language. All basic commands and programming statements will be discussed with examples.
- Editors Needed / Notepad++ / Dreamweaver
There are many Softwares / Editors used for PHP Development / PHP Programming. There is no restriction to use a specific one. It’s all upon you to select an editor. However, we recommend using notepad++. Also very popular and strong software used by programmers around the world is Dreamweaver. We recommend version 8 for its simple to use and takes less space in installation.
Free PHP Editors:
- Eclipse PDT
- NetBeans
- PHPEclipse
- Notepad++
- Software Needed / WAMP / MAMP / LAMP
- WAMP is used on WINDOWS environment (We are using windows environment)
- MAMP is used on MAC environment.
- LAMP is used on LINUX environment.
- Getting Start Programming in PHP / Writing our First PHP Script
PHP script/code is written in between the tags <?php and ?>
e.g
<?php // all php code will go here ?>
And the code/program file is saved with the extension .php
e.g welcome.php, index.php etc.
- PHP Comments
Have you noticed the above code snippet containing the double slashes //. Similar to C/C++ or Java Language, there are two types of comments 1) Single line comment 2) Multi-Line Comments.
Single Line comments start with // e.g
// This is a single line comment
// this is another single line comment
Every line starting with // will be ignored by the PHP Parser. However, it can also be used at the end of code statement Like
echo “Hello World” ; // It Prints Hello World
echo $my_age ; // It Prints value of variable $my_age
Multi-Line Comments Start with /* and ends at */. The code inside these two composite symbols will be ignored by the PHP Parser. See the example code below:
<?php /* This is first line of comment This is second line of comment similarly all these line inside the comments symbols will be ignored by the PHP Parser */ ?>
Single Line Comment can’t be used between the code statement But Multi-Line Comment can be used
as desired below
echo $name /* prints name */ . $age /* prints age */ ;
Every PHP Command is ended with a semicolon ;
- PHP Data Processing / Using PHP Variables
- How to show output in PHP? / ECHO Statement / PRINT Statement
**************** Continued *************