diff options
author | Jonathon Hill <jhill@brandmovers.com> | 2012-11-12 14:51:41 +0100 |
---|---|---|
committer | Jonathon Hill <jhill@brandmovers.com> | 2012-11-12 14:51:41 +0100 |
commit | 3978fc33d82dd7f778d1adbf30744f4dfac41c25 (patch) | |
tree | f32be1ae610f0cfeff65c35abecd14e8ea5cadc6 /user_guide_src/source/general/alternative_php.rst | |
parent | 275cf274860c6ed181d50b398efd3a21d7ba9135 (diff) | |
parent | a9ab46d7a031bda304eb9b6658ffaf693b8d9bcb (diff) |
Merge remote-tracking branch 'upstream/develop' into develop
Conflicts:
user_guide_src/source/changelog.rst
Signed-off-by: Jonathon Hill <jhill@brandmovers.com>
Diffstat (limited to 'user_guide_src/source/general/alternative_php.rst')
-rw-r--r-- | user_guide_src/source/general/alternative_php.rst | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/user_guide_src/source/general/alternative_php.rst b/user_guide_src/source/general/alternative_php.rst index 4dc857a50..418d2e6eb 100644 --- a/user_guide_src/source/general/alternative_php.rst +++ b/user_guide_src/source/general/alternative_php.rst @@ -17,12 +17,12 @@ Automatic Short Tag Support work on your server it might be that "short tags" are disabled in your PHP ini file. CodeIgniter will optionally rewrite short tags on-the-fly, allowing you to use that syntax even if your server doesn't support it. - This feature can be enabled in your config/config.php file. + This feature can be enabled in your *config/config.php* file. Please note that if you do use this feature, 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. +``eval()`` errors. Alternative Echos ================= @@ -39,13 +39,13 @@ Alternative Control Structures ============================== Controls structures, like if, for, foreach, and while can be written in -a simplified format as well. Here is an example using foreach:: +a simplified format as well. Here is an example using ``foreach``:: <ul> <?php foreach ($todo as $item): ?> - <li><?=$item?></li> + <li><?=$item?></li> <?php endforeach; ?> @@ -60,17 +60,16 @@ Also notice that instead of using a semicolon after each structure Here is another example, using ``if``/``elseif``/``else``. Notice the colons:: - <?php if ($username == 'sally'): ?> + <?php if ($username === 'sally'): ?> - <h3>Hi Sally</h3> + <h3>Hi Sally</h3> - <?php elseif ($username == 'joe'): ?> + <?php elseif ($username === 'joe'): ?> - <h3>Hi Joe</h3> + <h3>Hi Joe</h3> <?php else: ?> - <h3>Hi unknown user</h3> - - <?php endif; ?> + <h3>Hi unknown user</h3> + <?php endif; ?>
\ No newline at end of file |