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

array_column()

array_column(array $array, $column_key[, $index_key = NULL]) Parameters: $array (array) – Array to fetch results from $column_key (mixed) – Key of the column to return values from $index_key (mixed) – Key to use for the returned values Returns: An array of values representing a single column from the input array Return type: array For more information, please refer to the PHP manual for array_column().

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

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