Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function print_r_html($a, $return_insted_of_echo = FALSE, $tab_replacement = ' > ')
- {
- $output = nl2br(str_replace(' ', $tab_replacement, str_replace("\n\n", "\n", str_replace('<', '<', str_replace('&', '&', print_r($a, TRUE))))));
- $output_test = preg_replace("#({$tab_replacement})+#", '<span style="opacity: 0.25;">\0</span>', $output);
- if($output_test)
- {
- $output = $output_test;
- }
- if($output)
- {
- $output = "<span class='print_r'>{$output}</span>";
- }
- if($return_insted_of_echo)
- {
- return $output;
- }
- else
- {
- echo $output;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement