Show: All tutorials Toxiclab tutorials
PHP While Loop Statement
16.03.2013 20:42 in Php | 20 comments | source: | 4244 clicks
Suppose you want to calculate gross salaries of 20 different persons or take a list of maximum and minimum temperatures of a certain month or a year, the while loop is ideal to solve these types of cases.
The while statement is simple, it executes the statement(s) repeatedly as long as the condition is true. The condition is checked every time at the beginning of the loop.
PHP Switch statement
16.03.2013 20:41 in Php | 0 comments | source: | 4218 clicks
The control statement which allows us to make a decision from the number of choices is called a switch-case-default. It is almost similar to a series of if statements on the same expression.
Install PHP on Linux
13.03.2013 12:32 in Php | 0 comments | source: | 4214 clicks
If you are running Ubuntu, add deb http://security.ubuntu.com/ubuntupool/main/p/php5/ hardy-security main in your /etc/apt/sources.list
file using any text editor.
Alternatively you can follow these steps to find and download PHP for Ubuntu :
To obtain php installer for ubuntu Linux, go the the packages.ubuntu.com.
Scroll down and find Search package directories.
PHP : $_SERVER
05.12.2012 12:33 in Php | 0 comments | source: | 4164 clicks
$_SERVER has following basic properties:
Set by web server.Directly related to the runtime environment of the current php script.It does the same job as $HTTP_SERVER_VARS used to do in previous versions of PHP
PHP error handling
23.10.2012 13:02 in Php | 0 comments | source: | 4141 clicks
PHP has a number of functions for handling as well as reporting errors. Besides, you can define your own way of handling and reporting errors. In this and subsequent pages we are going to discuss about installation, runtime configuration, predefined constants and functions relating to PHP error handling and reporting.
PHP if statement
23.10.2012 13:01 in Php | 0 comments | source: | 3877 clicks
PHP uses if keyword to implement the decision control instruction. The structure is similar to C language.
23.10.2012 13:01 in Php | 8 comments | source: | 5122 clicks
Variable is a symbol or name that stands for a value. Variables are used for storing values such as numeric values, characters, character strings, or memory addresses so that they can be used in any part of the program.
PHP : Logical Operators
15.10.2012 20:27 in Php | 0 comments | source: | 3530 clicks
The standard logical operators and, or, not and xor are supported by PHP. Logical operators first convert their operands to boolean values and then perform the respective comparison.
PHP echo Statement
15.10.2012 20:27 in Php | 0 comments | source: | 3508 clicks
In PHP the two basic constructs to get output are echo and print. Actually echo() is not a function, it is a language construct therefore you can use it without parentheses.
PHP for loop
15.10.2012 20:27 in Php | 0 comments | source: | 3921 clicks
The PHP for loop allows the user to put all the loop-related statements (i.e. INITIALIZER; CONDITION; INCREMENTOR or DECREMENTOR) in one place. The structure is similar to C language.
PHP Form validation
15.10.2012 20:26 in Php | 390 comments | source: | 4797 clicks
In this tutorial we will see how to use PHP to validate the data collected from a form.