The for loop The for loop is used to execute a set of statements for a certain number of times. Syntax: for (init; condition; increment/decrement) { code to be executed; } Components of for loop: init: set a counter variable…
Tag: programming
PHP Tutorial – do while loop
The do while loop In do while loop the statements or conditions are executed first then that condition is evaluated, the loop will continue while the condition is true. Syntax: do { code to be executed; } while (condition); Example:…
PHP Tutorial – The while loop
A loop is a block of code that enables you to repeat the same set of statements or commands over and over again; the actual number of repetitions may be dependent on a number you specify. The while loop The…
PHP if…else…if statement
PHP if…else…if statement if…elseif….else statement – use this statement to select one of several blocks of code to be executed. The if…elseif….else statement This statement is used to select one of several blocks of code to be executed. The if..else…
PHP if statement
PHP if statement – this statement is used to execute a specific programming code if a specified condition is true. The if statement Used to execute a specific programming code if a specified condition is true. An if statement can…
PHP String Variable
PHP string variable is variable that is used contains text or characters. In this lesson we are going to learn how to store a string in a variable and use a string directly into a function. Let’s see some example…
PHP Variables
PHP Variables In this lesson we are going to learn how to declare a variable in PHP. A variable is something that can handle a piece of information. Variable in PHP can store values such as text and integers. The…
PHP Tutorial – Learning the PHP Syntax
PHP scripts are enclosed within a start and end tag. PHP scripts are embedded in a HTML document and you can place the PHP codes anywhere in the document. The two forms of PHP scripting block: The shorthand form starts…
Introduction to PHP scripting language
What is PHP? PHP stands for Hypertext Preprocessor. It is an open source server-side scripting language which means that the scripts are executed on the server like ASP (Active Server Pages). PHP is a cross-platform application that runs on Linux,…