-
-
Save arunoda/3b1828ab952fc0732ad8 to your computer and use it in GitHub Desktop.
Codeigniter - Extend Helper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Hello extends MY_Controller { | |
public function index() { | |
$this->load->helper('html'); | |
echo script_tag('js/main.js'); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function script_tag($location) { | |
return "<script src='$location' type='text/javascript'></script>"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment