Temas sobre: PHP
for loops on PHP
for loops are the most complex loops in PHP. They behave like their C counterparts. The syntax of a for loop is: for (expr1; expr2;
do-while for PHP
do-while loops are very similar to while loops, except the truth expression is checked at the end of each iteration instead of in the beginning.
while operator
while loops are the simplest type of loop in PHP. They behave just like their C counterparts. The basic form of a while statement is:
Alternative syntax for control structures
PHP offers an alternative syntax for some of its control structures; namely, if, while, for, foreach, and switch. In each case, the basic form of
elseif/else if
elseif, as its name suggests, is a combination of if and else. Like else, it extends an if statement to execute a different statement in
else operator
Often you’d want to execute a statement if a certain condition is met, and a different statement if the condition is not met. This is
Type Operators
instanceof is used to determine whether a PHP variable is an instantiated object of a certain class: Example #1 Using instanceof with classes <?php class
Array Operators
<- Scroll Horizontal disponible en esta tabla -> Array Operators Example Name Result $a + $b Union Union of $a and $b. $a == $b
String Operators
There are two string operators. The first is the concatenation operator (‘.’), which returns the concatenation of its right and left arguments. The second is