bbcode_create()
bbcode_create - Create a BBCode Resource
Syntax
resource bbcode_create (
array $bbcode_initial_tags)
Arguments
- bbcode_initial_tags - An associative array containing the tag names as keys and parameters required to correctly parse BBCode as their value. The following key/value pairs are supported: flags optional - a flag set based on the BBCODE_FLAGS_* constants. type required - an int indicating the type of tag. Use the BBCODE_TYPE_* constants. open_tag required - the HTML replacement string for the open tag. close_tag required - the HTML replacement string for the close tag. default_arg optional - use this value as the default argument if none is provided and tag_type is of type OPTARG. content_handling optional - Gives the callback used for modification of the content. Object Oriented Notation supported only since 0.10.1 callback prototype is string name(string , string ) param_handling optional - Gives the callback used for modification of the argument. Object Oriented Notation supported only since 0.10.1 callback prototype is string name(string , string ) childs optional - List of accepted children for the tag. The format of the list is a comma separated string. If the list starts with ! it will be the list of rejected children for the tag. parent optional - List of accepted parents for the tag. The format of the list is a comma separated string.
Description
This function returns a new BBCode Resource used to parse BBCode strings.
Version
PHP PECL bbcode >= 0.9.0
Return value
Returns a BBCode_Container