A control structure is block of code that is executed based on a condition. A repetition control structure repeats program statements based on the evaluation of a condition. PHP has the following repetition control structures:
Let’s take a look at how each of these repetition control structures function.
A good programming practice is called Do not Repeat Yourself (DRY). The idea is that you attempt to maximize code reuse. One way to do this is to write functions. A function is a block of code that you write once and then you can execute it multiple times from other parts of your code. Executing a function is called “calling” it. PHP allows you to write functions quite easily.
A brand new theme for wordpress users. BlackLens is a black, white and pink theme with a floral decoration in the top right of the page. Its a two column theme with a left sidebar and support for widgets:
Fuad of bloganything.net has released his Blog Pixel wordpress theme for free. Blog Pixel is a wide three column theme with impressive attention to detail. As Fuad puts it in his post, blog pixel is very easy on the eyes.
With a wide left side column for your posts and two sidebars on the right, blog pixel gives your posts prime screen position while also providing you with plenty of space in your sidebars. There are also different colour versions of blog pixel available. Go on try out Blog Pixel!
Variables are used by programmers to store values and to refer to those values in code. Variables in PHP need not be defined. Variable types also do not exist although variable scope does. All variables begin with a $ sign. Variable names can contain numbers, letters and underscores. Variable names can only begin with letters or underscores. PHP variables are case sensitive. For ex: $a is different from $A. Below are given some examples of valid variable names: