Heres the code Im using. I do not understand why it doesn't return anything. What I mean is it doesn't echo varo's value. The page is blank.
<?php
$varo="mdddono";
function bbcode_format($varo) {
$search = array(
'/[b](.?)[\/b]/is',
'/[i](.?)[\/i]/is',
'/[u](.?)[\/u]/is',
'/[img](.?)[\/img]/is',
'/[url](.?)[\/url]/is',
'/[url\=(.?)](.*?)[\/url]/is'
);
$replace = array(
'<strong>$1</strong>',
'<em>$1</em>',
'<u>$1</u>',
'<img src="$1" />',
'<a href="$1">$1</a>',
'<a href="$1">$2</a>'
);
$var = preg_replace ($search, $replace, $varo);
return $varo;
echo $varo;
}
?>