[eluser]Mario "St.Peter" Valentino[/eluser]
hello all
i want to make new helper to generate data.
how can i make a new helper ?
any body here can explain me and give me an example tutorial
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Assets Helper
*
*/
if ( ! function_exists('asset_url'))
{
function asset_url()
{
// the helper function doesn't have access to $this, so we need to get a reference to the
// CodeIgniter instance. We'll store that reference as $CI and use it instead of $this
$CI =& get_instance();
// return the asset_url
return base_url() . $CI->config->item('asset_path');
}
}
/* ------------------------------------------------------------------------
* End of file assets_helper.php
* Location: ./application/helpers/assets_helper.php
* ------------------------------------------------------------------------
*/