With this function:
function bbcode_parse($str) {
$str = htmlentities($str);
$find = array(
'/\\*\*(.[^*]*)\*\*/is',
);
$replace = array(
'<b>'
);
$str = preg_replace($find, $replace, $str);
return $str;
}
And with text "My name is **bob**
"
I get in source code Hi my name is <b>
Been trying to get this to work for a while now.
Would appricate some expert help :)