RHochstenbach
Administrator
If you have a lot of IF statements and loops nested into each other, you might find it confusing to see which bracket belongs to which instruction. Something like this:
You can replace the bracket with the word end, followed by the name of the instruction. Examples are endif, endwhile, endfor etc. This gives a result similar to this:
Looks easier to read, doesn't it :)
PHP:
if(1 == 1) {
while(1 == 1) {
echo "1";
if(2==2) {
while(2==2) {
echo "2";
}
}
}
}
You can replace the bracket with the word end, followed by the name of the instruction. Examples are endif, endwhile, endfor etc. This gives a result similar to this:
PHP:
if(1 == 1) {
while(1 == 1) {
echo "1";
if(2==2) {
while(2==2) {
echo "2";
endwhile;
endif;
endwhile;
endif;
Looks easier to read, doesn't it :)