PHP-Fusion Development


Parse BBCodes, smileys and any special characters to HTML string.

Versions: 9

parse_textarea( string $value [, bool $parse_smileys, bool $parse_bbcode, bool $decode, string $default_image_folder, bool $add_line_breaks, bool $descript ] ) : string


$value (string) (Required) String with unparsed text.

$parse_smileys (bool) (Optional) Smiley parsing. Default value: true

$parse_bbcode (bool) (Optional) BBCode parsing. Default value: true

$decode (bool) (Optional) Decode HTML entities. Default value: true

$default_image_folder (string) (Optional) Image folder for parse_imageDir(). Default value: IMAGES

$add_line_breaks (bool) (Optional) Allows nl2br(). Default value: false

$descript (bool) (Optional) Sanitize text. Default value: true

Return Values

(string) Parsed string.


$value = 'Text :D [url][/url]';
echo parse_textarea($value, TRUE, TRUE, FALSE);
// Text <img src='' alt='Grin'> <a href=''></a>