CodeIgniter Forums

Full Version: A Simple Font Awesome Helper
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I use this one a good deal... in my project.

Super simple and easy to use... See Readme.

i have made it even more simple, n no need to update Smile this will work even after font awesome will add new icons after update

PHP Code:
 * Author:
 * Date: 8/24/15
 * Hope this helps you, please at least leave my name in place
 * Modified by:
 * Date: 5/3/16
defined('BASEPATH') OR exit('No direct script access allowed');
if ( ! 
     * Icon
     * Generates an Font-Awesome icon tag.
     * @param    string icon
     * @param    string attributes
     * @return    string
function fa_icon($icon ''$attributes '')
'<i class="fa fa-'.$icon.' '.$attributes.'">'.'</i>';