use the array function and str_replace
<?php $bb_Code = array( '[code]' => '<code>', '[/ code ]' => '</ code>' ); // so on so forth with the bbcode foreach ($bb_Code as $value => $replace) { $text = str_replace($value, $replace, $text); } echo $text; ?>
simple stuff.
Edited by bigdfbc2008, 30 June 2008 - 10:55 PM.