Thanks a lot, but do you know how to do the same with ereg_replace? I'm
trying to learn PCRE, but until I do, I won't be able to add anything to
this...
<?php
function bbcode($text){
$text = ereg_replace("(\\[i\\])([^\\[]+)(\\[/i\\])",'<i>\\2</i>',$text);
return $text;
}
print bbcode('[i]This[/i] is a [i]test[/i].');
?>
Works...
--
Kyle Gibson
admin(at)frozenonline.com
http://www.frozenonline.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php