Skip to:
Content
Pages
Categories
Search
Top
Bottom

Re: How to show code in forum posts?


danbpfr
Participant

@chouf1

i give a try here, using backticks
`
function bporg_decodeit( $matches ) {
$text = $matches[2];
$trans_table = array_flip(get_html_translation_table(HTML_ENTITIES));
$text = strtr($text, $trans_table);
$text = str_replace(‘
‘, ”, $text);
$text = str_replace(‘

‘, ”, $text);
$text = str_replace(‘

‘, ”, $text);
$text = str_replace(array(‘&’,’&’), ‘&’, $text);
$text = str_replace(”’, “‘”, $text);
if ( ‘

' == $matches[1] )
$text = "n$textn";
return "`$text`";
}
`
on my forum it is showing this
http://bp-fr.net/groups/groupe-de-tests/forum/topic/another-test/
Skip to toolbar