element()

element($item, $array[, $default = NULL]) Parameters: $item (string) – Item to fetch from the array $array (array) – Input array $default (bool) – What to return if the array isn’t valid Returns: NULL on failure or the array item. Return type: mixed Lets you fetch an item from an array. The function tests whether the array index is set and whether it has a value. If a value exists it is returned. If a value does not exist it returns NULL, or whatever you’ve specified as the defaul

ellipsize()

ellipsize($str, $max_length[, $position = 1[, $ellipsis = '…']]) Parameters: $str (string) – Input string $max_length (int) – String length limit $position (mixed) – Position to split at (int or float) $ellipsis (string) – What to use as the ellipsis character Returns: Ellipsized string Return type: string This function will strip tags from a string, split it at a defined maximum length, and insert an ellipsis. The first parameter is the string to ellipsize, the second is the num

encode_php_tags()

encode_php_tags($str) Parameters: $str (string) – Input string Returns: Safely formatted string Return type: string This is a security function that converts PHP tags to entities. Note xss_clean() does this automatically, if you use it. Example: $string = encode_php_tags($string);

doctype()

doctype([$type = 'xhtml1-strict']) Parameters: $type (string) – Doctype name Returns: HTML DocType tag Return type: string Helps you generate document type declarations, or DTD’s. XHTML 1.0 Strict is used by default, but many doctypes are available. Example: echo doctype(); // <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> echo doctype('html4-trans'); // <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http:/

Downloading CodeIgniter

CodeIgniter v3.1.0 (Current version) CodeIgniter v3.0.6 CodeIgniter v3.0.5 CodeIgniter v3.0.4 CodeIgniter v3.0.3 CodeIgniter v3.0.2 CodeIgniter v3.0.1 CodeIgniter v3.0.0 CodeIgniter v2.2.3 CodeIgniter v2.2.2 CodeIgniter v2.2.1 CodeIgniter v2.2.0 CodeIgniter v2.1.4 CodeIgniter v2.1.3 CodeIgniter v2.1.2 CodeIgniter v2.1.1 CodeIgniter v2.1.0 GitHub Git is a distributed version control system. Public Git access is available at GitHub. Please note that while every effort is made to keep this code

do_hash()

do_hash($str[, $type = 'sha1']) Parameters: $str (string) – Input $type (string) – Algorithm Returns: Hex-formatted hash Return type: string Permits you to create one way hashes suitable for encrypting passwords. Will use SHA1 by default. See hash_algos() for a full list of supported algorithms. Examples: $str = do_hash($str); // SHA1 $str = do_hash($str, 'md5'); // MD5 Note This function was formerly named dohash(), which has been removed in favor of do_hash(). Note This funct

directory_map()

directory_map($source_dir[, $directory_depth = 0[, $hidden = FALSE]]) Parameters: $source_dir (string) – Path to the source directory $directory_depth (int) – Depth of directories to traverse (0 = fully recursive, 1 = current dir, etc) $hidden (bool) – Whether to include hidden directories Returns: An array of files Return type: array Examples: $map = directory_map('./mydirectory/'); Note Paths are almost always relative to your main index.php file. Sub-folders contained within

Design and Architectural Goals

Our goal for CodeIgniter is maximum performance, capability, and flexibility in the smallest, lightest possible package. To meet this goal we are committed to benchmarking, re-factoring, and simplifying at every step of the development process, rejecting anything that doesn’t further the stated objective. From a technical and architectural standpoint, CodeIgniter was created with the following objectives: Dynamic Instantiation. In CodeIgniter, components are loaded and routines executed only w

delete_files()

delete_files($path[, $del_dir = FALSE[, $htdocs = FALSE]]) Parameters: $path (string) – Directory path $del_dir (bool) – Whether to also delete directories $htdocs (bool) – Whether to skip deleting .htaccess and index page files Returns: TRUE on success, FALSE in case of an error Return type: bool Deletes ALL files contained in the supplied path. Example: delete_files('./path/to/directory/'); If the second parameter is set to TRUE, any directories contained within the supplied ro

date_range()

date_range([$unix_start = ''[, $mixed = ''[, $is_unix = TRUE[, $format = 'Y-m-d']]]]) Parameters: $unix_start (int) – UNIX timestamp of the range start date $mixed (int) – UNIX timestamp of the range end date or interval in days $is_unix (bool) – set to FALSE if $mixed is not a timestamp $format (string) – Output date format, same as in date() Returns: An array of dates Return type: array Returns a list of dates within a specified period. Example: $range = date_range('2012-01-01