Category Archives for "PHP"

Loops in PHP – Explained

Loops in PHP allow us to repeat code until certain condition is met. A loop will go round and round and round multiple times executing the code until certain conditions are met. Very similar to the conditional statements but more powerful. There are four PHP looping statements. while – loops through a code block as […]

Continue reading

Conditional Statements in PHP

PHP allows us to perform actions based on different conditions. This means we can create conditions that evaluates to either true or false and based on that result we can perform certain actions. These are called Conditional Statements. Conditional Statements are also known as – conditional expressions or conditional constructs. Conditional Statements in PHP There are few conditional […]

Continue reading

Ternary Operator in PHP – Explained

If you don’t know what’s a ternary operator in PHP is, then you’re missing a cool feature of PHP. There are few operators in PHP which seems a bit complicated. Ternary Operator is one of them. The reason it’s called ternary operator is exactly what you are thinking, it’s composed of three operands. (Operands are […]

Continue reading

Multidimensional Arrays in PHP

In my previous post, I discussed about arrays in PHP. Arrays can contain multiple values at a time. Arrays can also contain other arrays inside them. When you create arrays inside another array, that’s a multidimensional array. Multidimensional arrays can be two-dimensional, three-dimensional or more. But it gets a little complicated if you create a bigger one. […]

Continue reading
1 2 3