Something that really would like to know but never found out are shortcuts in PHP.
I am currently coding a function with a foreach loop with just a sing
The answer is easy. This is the same in C/C++.
if, if/else, if/else if/ else and loops => If the next statement is one single line, you can omit the curly braces.
Ex:
for($i= 0; $i<=100; $i++)
{
if($i % 7 == 0)
{
echo $i . "
";
}
}
It can also be written in this way:
for($i= 0; $i<=100; $i++) if($i % 7 == 0) echo $i . "
";