Displaying coding language in end user view |
[eluser]elaniobro[/eluser]
I have been reading through the forums and the wiki, I have not seen any instance or refrence to what I am trying to accomplish, perhaps it is due to a lack of vocab on the subject. I would like to do what this forum does. Essential use[code[]/code] (I reversed them so you can see) to display Code on the webpage. Is their a helper/library out there that can achieve this? So in essense I would like to be able to display code on my site similar to how you see it below: Code: $this->load->view('header', $data); It would be even better if you can get Line numbers involved.
[eluser]John_Betong[/eluser]
Play around with this and see if it help: Code: <?php highlight_file( __FILE__ ); ?>
[eluser]elaniobro[/eluser]
Thanks, could you point me to the documentation for that so I can read up on it? Appreciate the help
[eluser]John_Betong[/eluser]
[quote author="elaniobro" date="1267601772"]Thanks, could you point me to the documentation for that so I can read up on it? Appreciate the help [/quote] A quick Google and... http://php.net/manual/en/function.highlight-file.php I also discovered show_source(...) but have not tried it. And an example: http://johns-jokes.com/downloads/codeign...ss_tables/ |
Welcome Guest, Not a member yet? Register Sign In |