PHP Basics

Recent Tutorial

PHP Namespace

September 5, 2013
In the file system, we have directories or folders to keep related files. Similarly, PHP namespaces are used to have related code blocks of a PHP program that are reusable, like, classes, functions, interfaces under its reference. And, PHP namespaces can also capable of containing constants. Operations Performed using PHP NameSpaces With PHP namespaces, we […]
This tutorial was added to PHP.

foreach in PHP

August 20, 2013
In PHP, foreach statement is used to iterate over a collection of data, like PHP arrays. As per the name of this construct, it will keep on continue with the loop to traverse given input array for each of its element, without any condition. We have slightly touched about how this is working in PHP […]
This tutorial was added to PHP.

PHP If Else Statement

July 25, 2013
If and Else statements are a kind of PHP conditional statements, since it applies one or more conditions upon a block of code, based on which the block is taken or non-taken for execution. These statements handle execution of a give PHP code based on conditions associated with it, like, other conditional statements, coming under […]
This tutorial was added to PHP.

PHP unlink() Vs unset()

July 14, 2013
These two PHP functions are identical on performing some undo operations but differs in the type of data on which they are applied to perform such undo functionalities. In PHP, unlink() is acting as the drop operation which will completely delete files, whereas, unset() is used to delete the file content for emptying it. Let […]
This tutorial was added to PHP.

PHP Delimiters

June 26, 2013
PHP delimiters are nothing but the open close tags to enclose PHP script. PHP code can be parsed if and only if it is enclosed with these delimiters. There are various set of delimiters to recognize PHP code. These are as listed below. <?php … ?> – It is most probably used delimiters and also […]
This tutorial was added to PHP.

PHP Redirect

May 28, 2013
PHP redirect mechanism is used to navigate the user from one page to another without clicking any hyperlinks. This will be helpful in such circumstances where the redirect should be done in the background. For example, when the user is accessing payment gateway, the redirect should automatically be taken place to notify URL using PHP […]
This tutorial was added to PHP.

PHP Constants

April 26, 2013
As like as many programming languages, PHP also contains constants. It has some predefined constants in its core like PHP_VERSION, PHP_DEBUG and more. We can define constants by using the define() function. Generally, constants are in global scope. We can also define class-specific or interface-specific constants by using PHP const keyword. In this tutorial, we are going to see examples for defining […]
This tutorial was added to PHP.

PHP Loops

April 23, 2013
Loops are used to run the same lines of code for multiple times. If we want to execute same code multiple times then we can put it into a loop block to avoid code repetition. Loop structure includes three sections. These are, Initialization – To initialize the first iteration index of the loop. Conditional execution – For […]
This tutorial was added to PHP.

PHP include() Vs require()

April 22, 2013
In this tutorial, we are going to see the list of functions used in PHP to include external file into a program. PHP provides various functions to include external files. It is required if the current code dependency is on the external file to be included. For example, if we want to create an instance of […]
This tutorial was added to PHP.

PHP Print Statements

April 18, 2013
In PHP there are various methods to print data. PHP provides more functions and language constructs for printing various data types. These functions are varied on the data format printed on the browser using them. For example, the print() and echo() statements prints string data, whereas, the print_r() is used to print compound datatype like arrays […]
This tutorial was added to PHP.

PHP Comments

April 13, 2013
Comments on source code will be useful for denoting the details the code logic. For an example, if we define a function in our program, we should add comment lines to state about the parameters passed to the function, what the function is doing and what it returns. These comment lines will be useful to […]
This tutorial was added to PHP.

PHP Hello World

April 11, 2013
This is the first post on my PHP blog Phppot. I am starting this blog with a lot of enthusiasm, love, and confidence. Hope I will add some value to the PHP community. Following the tradition, let me start with the Hello World program in PHP. Following script displays the sentence “Hello, World!” in the browser. […]
This tutorial was added to PHP.

↑ Back to Top