BBCode::format PHP Method

format() public method

Parse the provided BBCode into an HTML string.
public format ( string $bbcode ) : string
$bbcode string Raw BBCode.
return string HTML code, generated from the provided BBCode.
    public function format($bbcode)
    {
        $bbcode = str_replace(['[CODE]', '[/CODE]'], ['[code]', '[/code]'], $bbcode);
        return $this->nbbc()->parse($bbcode);
    }

Usage Example

Beispiel #1
0
 private function filter($in)
 {
     $bb = new BBCode();
     return $bb->format($in);
 }
All Usage Examples Of BBCode::format