Retired Documentation:  You are using the documentation for version 1.7.3 which was retired in 2013. Go here for the latest version documentation or check here for your available upgrades to the latest version.

View Files and PHP Syntax

In view files only, it is recommended that you use PHPs alternative syntax for control structures and short tag echo statements. This minimizes the amount of PHP code in the view file and makes it easier to identify the code blocks. If you are not familiar with this syntax, it allows you to eliminate the braces from your code, and eliminate "echo" statements.

Note: If "short tags" are disabled in your PHP ini file, ExpressionEngine will automatically rewrite them for you. In such a case, if PHP errors are encountered in your view files, the error message and line number will not be accurately shown. Instead, all errors will be shown as eval() errors.

Table of Contents

PHP Alternate Syntax

Top of Page