Code Igniter User Guide Version 1.5.0b3


HTML Helper

The HTML Helper file contains functions that assist in working with HTML.

Loading this Helper

This helper is loaded using the following code:

$this->load->helper('html');

The following functions are available:

heading()

Lets you create HTML <h1> tags. The first parameter will contain the data, the second the size of the heading. Example:

echo heading('Welcome!', 3);

The above would produce: <h3>Welcome!</h3>

nbs()

Generates non-breaking spaces (&nbsp;) based on the number you submit. Example:

echo nbs(3);

The above would produce: &nbsp;&nbsp;&nbsp;

br()

Generates line break tags (<br />) based on the number you submit. Example:

echo br(3);

The above would produce: <br /><br /><br />