system/helpershtml_helper.php

CodeIgniter

An open source application development framework for PHP

This content is released under the MIT License (MIT)

Copyright (c) 2014 - 2016, British Columbia Institute of Technology

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Functions

heading()

heading(  $data = '',   $h = '1',   $attributes = '') : string

Heading

Generates an HTML heading tag.

Parameters

$data
$h
$attributes

Returns

string

ul()

ul(  $list,   $attributes = '') : string

Unordered List

Generates an HTML unordered list from an single or multi-dimensional array.

Parameters

$list
$attributes

Returns

string

ol()

ol(  $list,   $attributes = '') : string

Ordered List

Generates an HTML ordered list from an single or multi-dimensional array.

Parameters

$list
$attributes

Returns

string

_list()

_list(  $type = 'ul',   $list = array(),   $attributes = '',   $depth) : string

Generates the list

Generates an HTML ordered list from an single or multi-dimensional array.

Parameters

$type
$list
$attributes
$depth

Returns

string

img()

img(  $src = '',   $index_page = FALSE,   $attributes = '') : string

Image

Generates an element

Parameters

$src
$index_page
$attributes

Returns

string

doctype()

doctype(  $type = 'xhtml1-strict') : string

Doctype

Generates a page document type declaration

Examples of valid options: html5, xhtml-11, xhtml-strict, xhtml-trans, xhtml-frame, html4-strict, html4-trans, and html4-frame. All values are saved in the doctypes config file.

Parameters

$type

Returns

string

link_tag()

link_tag(  $href = '',   $rel = 'stylesheet',   $type = 'text/css',   $title = '',   $media = '',   $index_page = FALSE) : string

Link

Generates link to a CSS file

Parameters

$href
$rel
$type
$title
$media
$index_page

Returns

string

meta()

meta(  $name = '',   $content = '',   $type = 'name',   $newline = "\n") : string

Generates meta tags from an array of key/values

Parameters

$name
$content
$type
$newline

Returns

string

br()

br(integer  $count = 1) : string

Generates HTML BR tags based on number supplied

Parameters

integer $count

Number of times to repeat the tag

Returns

string

nbs()

nbs(  $num = 1) : string

Generates non-breaking space entities based on number supplied

Parameters

$num

Returns

string