![]() |
|
php Block |
||
|
AboutThis Action may be likened to a Swiss Army knife: PHP Block allows you to define a section of a Freeway page as a block of PHP. The Freeway page may contain any number of the following items: A text box An image, rollover, stack, and similar items A table A table cell. You can choose whether to have Block applied to a cell or a row, and you can also choose how many rows Block will cover. You can surround the PHP Block with PHP code to perform a loop. To allow this, the variable ‘$fwCount’ is created. This allows the PHP code to loop through the HTML code and rename images, image maps, and so on. This is necessary so that rollovers, image maps and similar items will function correctly when duplicated by PHP. Don’t use $fwCount for anything else. PHP Block cannot be nested or used with any other PHP Action. A good example of the use of PHP Block is to have it work through an array of pre-sorted data. $fwCount is used more than once in the page: once for the main data output, and again for any image maps that may be generated. You must reset your array in the ‘After Text’ field, or your PHP page may fail. PHP Block is a destructive Action. Actions that run after it may not produce the results that are desired. Because of this, PHP Block is set to run at the ‘fwAfterEndHTML()’ line of code. The Action will by default output code using PHP4's HEREDOC syntax. IF you switch this off, the code will be output using a string of print statements instead. |
|||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||