Alternate PHP Syntax for View Files

If you do not utilize CodeIgniter’s template engine, you’ll be using pure PHP in your View files. To minimize the PHP code in these files, and to make it easier to identify the code blocks it is recommended that you use PHPs alternative syntax for control structures and short tag echo statements. If you are not familiar with this syntax, it allows you to eliminate the braces from your code, and eliminate “echo” statements. Automatic Short Tag Support Note If you find that the syntax described

anchor_popup()

anchor_popup($uri = '', $title = '', $attributes = FALSE) Parameters: $uri (string) – URI string $title (string) – Anchor title $attributes (mixed) – HTML attributes Returns: Pop-up hyperlink Return type: string Nearly identical to the anchor() function except that it opens the URL in a new window. You can specify JavaScript window attributes in the third parameter to control how the window is opened. If the third parameter is not set it will simply open a new window with your own

anchor()

anchor($uri = '', $title = '', $attributes = '') Parameters: $uri (string) – URI string $title (string) – Anchor title $attributes (mixed) – HTML attributes Returns: HTML hyperlink (anchor tag) Return type: string Creates a standard HTML anchor link based on your local site URL. The first parameter can contain any segments you wish appended to the URL. As with the site_url() function above, segments can be a string or an array. Note If you are building links that are internal to

alternator()

alternator($args) Parameters: $args (mixed) – A variable number of arguments Returns: Alternated string(s) Return type: mixed Allows two or more items to be alternated between, when cycling through a loop. Example: for ($i = 0; $i < 10; $i++) { echo alternator('string one', 'string two'); } You can add as many parameters as you want, and with each iteration of your loop the next item will be returned. for ($i = 0; $i < 10; $i++) { echo alternator('one', 'two',

Application Flow Chart

The following graphic illustrates how data flows throughout the system: The index.php serves as the front controller, initializing the base resources needed to run CodeIgniter. The Router examines the HTTP request to determine what should be done with it. If a cache file exists, it is sent directly to the browser, bypassing the normal system execution. Security. Before the application controller is loaded, the HTTP request and any user submitted data is filtered for security. The Controller lo