form_hidden()

form_hidden($name[, $value = '']) Parameters: $name (string) – Field name $value (string) – Field value Returns: An HTML hidden input field tag Return type: string Lets you generate hidden input fields. You can either submit a name/value string to create one field: form_hidden('username', 'johndoe'); // Would produce: <input type="hidden" name="username" value="johndoe" /> ... or you can submit an associative array to create multiple fields: $data = array( 'name' =&

form_fieldset_close()

form_fieldset_close([$extra = '']) Parameters: $extra (string) – Anything to append after the closing tag, as is Returns: An HTML fieldset closing tag Return type: string Produces a closing </fieldset> tag. The only advantage to using this function is it permits you to pass data to it which will be added below the tag. For example $string = '</div></div>'; echo form_fieldset_close($string); // Would produce: </fieldset></div></div>

form_error()

form_error([$field = ''[, $prefix = ''[, $suffix = '']]]) Parameters: $field (string) – Field name $prefix (string) – Error opening tag $suffix (string) – Error closing tag Returns: HTML-formatted form validation error message(s) Return type: string Returns a validation error message from the Form Validation Library, associated with the specified field name. You can optionally specify opening and closing tag(s) to put around the error message. Example: // Assuming that the 'userna

form_close()

form_close([$extra = '']) Parameters: $extra (string) – Anything to append after the closing tag, as is Returns: An HTML form closing tag Return type: string Produces a closing </form> tag. The only advantage to using this function is it permits you to pass data to it which will be added below the tag. For example: $string = '</div></div>'; echo form_close($string); // Would produce: </form> </div></div>

form_checkbox()

form_checkbox([$data = ''[, $value = ''[, $checked = FALSE[, $extra = '']]]]) Parameters: $data (array) – Field attributes data $value (string) – Field value $checked (bool) – Whether to mark the checkbox as being checked $extra (mixed) – Extra attributes to be added to the tag either as an array or a literal string Returns: An HTML checkbox input tag Return type: string Lets you generate a checkbox field. Simple example: echo form_checkbox('newsletter', 'accept', TRUE); // Woul

form_dropdown()

form_dropdown([$name = ''[, $options = array()[, $selected = array()[, $extra = '']]]]) Parameters: $name (string) – Field name $options (array) – An associative array of options to be listed $selected (array) – List of fields to mark with the selected attribute $extra (mixed) – Extra attributes to be added to the tag either as an array or a literal string Returns: An HTML dropdown select field tag Return type: string Lets you create a standard drop-down field. The first paramete

form_button()

form_button([$data = ''[, $content = ''[, $extra = '']]]) Parameters: $data (string) – Button name $content (string) – Button label $extra (mixed) – Extra attributes to be added to the tag either as an array or a literal string Returns: An HTML button tag Return type: string Lets you generate a standard button element. You can minimally pass the button name and content in the first and second parameter: echo form_button('name','content'); // Would produce: <button name="name" t

force_download()

force_download([$filename = ''[, $data = ''[, $set_mime = FALSE]]]) Parameters: $filename (string) – Filename $data (mixed) – File contents $set_mime (bool) – Whether to try to send the actual MIME type Return type: void Generates server headers which force data to be downloaded to your desktop. Useful with file downloads. The first parameter is the name you want the downloaded file to be named, the second parameter is the file data. If you set the second parameter to NULL and $file

entity_decode()

entity_decode($str, $charset = NULL) Parameters: $str (string) – Input string $charset (string) – Character set Returns: String with decoded HTML entities Return type: string This function is an alias for CI_Security::entity_decode(). Fore more info, please see the Security Library documentation.

elements()

elements($items, $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 a number of items from an array. The function tests whether each of the array indices is set. If an index does not exist it is set to NULL, or whatever you’ve specified as the default value via the third parameter. Exa