/ Published in: PHP
alternative to print_r with syntax highlight using jquery
Expand |
Embed | Plain Text
function test($var, $lang = 'php', $apenas_var = true, $die = true){ if($apenas_var) echo '<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>'; echo '<script type="text/javascript" src="http://github.com/balupton/jquery-syntaxhighlighter/raw/master/scripts/jquery.syntaxhighlighter.min.js"></script>'; echo '<script type="text/javascript">$.SyntaxHighlighter.init();</script>'; echo ''; if($lang == 'html') else echo '</code>'; if($die){ } }
You need to login to post a comment.
