PHP Language - Statements

PHP
PHP Information

The PHP Break Statement star
The PHP break statement is placed within the code of a loop statement to cause your program to break out of the loop statement. Below is an example of a break statement that has been added to a loop statement.

The PHP Do While Statement star
This tutorial is about the PHP do..while statement which is a loop statement similar to the while statement that we discussed in the previous tutorial. And like the while statement, you can use the do..while statement to instruct your program to perform a task repeatedly until you tell it to stop.

The PHP For Statement star
The for statement is used to control a loop within your PHP program. It works like the while and do..while statements that we discussed in previous tutorials. The for statement tests an expression. If that expression is true the program will execute the task within the loop. Here is the basic code.

The PHP Global Statement star
One way to make an outside variable available to a function is to use the PHP global statement. The global statement brings the outside variable into the function code so you can use the variable.

The PHP If Statement And The Else Clause star
One of the most frequently used piece of PHP code is the if else statement. The PHP if else statement makes it possible for your programs to ask questions and make decisions based on the answer.

The PHP If Statement And The Elseif Clause star
In the last tutorial we discussed the if statement and the else clause and how it can be used to allow your program to make simple either/or decisions. In this tutorial, we will examine how to add the elseif clause to the if statement to allow your program to make more complex decisions.

The PHP Return Statement star
The PHP return statement is used to tell a PHP function to send information back to the calling program. This can be useful in many ways.

The PHP Static Statement star
The magic of the PHP static statement is that it allows a function to remember the value of a local variable for the next time the function is called. In this tutorial you will learn how to use the PHP static statement to give a PHP function some memory.

The PHP Switch Statement star
In a previous tutorial we discussed how to use the PHP if statement in your programs to ask questions and make decisions. By using the if statement you can control the flow of your program. Now we will explore the PHP switch statement which also can be used to control the flow of your program.

The PHP While Statement star
There will be many times when you want your PHP program to perform a task repeatedly until you tell it to stop. You will use a PHP loop statement to do this. In this tutorial we will discuss one type of loop statement called the PHP while statement.

Editor's Picks Articles
Top Ten Articles
Previous Features
Site Map







Content copyright © 2018 by . All rights reserved.
This content was written by . If you wish to use this content in any manner, you need written permission. Contact BellaOnline Administration for details.