PDA

View Full Version : What did I do wrong?



KingOfHeart
February 28th, 2011, 12:48 AM
function HTMLToBBCode($message)
{
$html = array(
'/\<span class="ozentity">/' => "",
'/\<span class="ozkey">/' => "[color=#0000FF]",
'/\<span class="ozquote">/' => "[color=#303030]",
'/\</span>/' => "",
);
$message = preg_replace(array_keys($html), array_values($html), $message);//line 27
return $message;
}

got an error for line 27

foxmuldr
March 2nd, 2011, 09:01 AM
function HTMLToBBCode($message)
{
$html = array(
'/\<span class="ozentity">/' => "",
'/\<span class="ozkey">/' => "[color=#0000FF]",
'/\<span class="ozquote">/' => "[color=#303030]",
'/\</span>/' => "",
);
$message = preg_replace(array_keys($html), array_values($html), $message);//line 27
return $message;
}

got an error for line 27


Is it the spurious trailing comma on line 25?

- Rick C. Hodgin