diff --git a/language/basic-syntax.xml b/language/basic-syntax.xml index 4d60049243..cb280594ad 100644 --- a/language/basic-syntax.xml +++ b/language/basic-syntax.xml @@ -1,12 +1,63 @@ Basic syntax + + Escaping from HTML - There are four ways of escaping from HTML and entering "PHP code - mode": + When PHP starts to handle file, it will just output the text + it encouters. So if you have a HTML-file, and you change its + extension to .php, your file will keep working. + + + + If you want to insert php-statements at some point in your + file, you'll need to indicate so to php, by entering "PHP mode" + in either of the following ways: + @@ -53,7 +104,35 @@ The closing tag for the block will include the immediately - trailing newline if one is present. + trailing newline if one is present. + + + + PHP allows you to use structures like this: + Advanced escaping + +<?php + +if ( boolean-expression ) +{ + ?> +<strong>This is true.</strong> + <?php +} +else +{ + ?> +<strong>This is false.</strong> + <?php +} + + + This works as expected, because PHP handles text within ?> and + <?php as an echo statement. + + + + Instruction separation