From 64e21277b714dac584d8d36ea38fbc61314ed848 Mon Sep 17 00:00:00 2001 From: Jeroen van Wolffelaar Date: Wed, 16 May 2001 15:19:25 +0000 Subject: [PATCH] - Begin with revision of language section. basic-syntax: - Added note about revision, and progress-info - Explained escaping a bit more eleborately - Explained escaping inside control structures (quite badly, I admit, but still) types: - Added null and resource - Categorized in scalars, compound and special - Added 'converting to xxx' section for boolean and integer (rest follows some day) - Moved 'when is something considered true' to that new section, and updated it. - Added overflow and converting notes to integer. Referred to float-precision warning. - Added section about resource-freeing - In type-juggling, referred to the new 'convert to xxx' sections. - fixed some xml-tags - converted most > to > git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@47584 c90b9560-bf6c-de11-be94-00142212c4b1 --- language/basic-syntax.xml | 85 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 82 insertions(+), 3 deletions(-) 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