checkTagUsed() (Validator Engine Only)

•1 - display the default error message if all tagnames have not been used after $isopentag

•2 - use the start tag for the last closed tag instead of $isopentag; do not supply the $isopentag parameter if using this flag (see also hasChildElement())

•4 - don't consider the last added component when searching for any $tagnamex

•8 - before $isopentag, specify a tag, $excludetag, so that if $tagnamex is contained in $excludetag, then it is as if that occurrence of $tagnamex did not occur; do not use with flag 16

•16 - when using this flag, specify an integer, $numexcludetags, after $flags to specify the number of $excludetagx's that will be specified before $isopentag; this flag is similar to flag 8, but allows you to specify more than one $excludetag; do not use with flag 8

•32 - display a warning message if no $tagnamex's are supplied and no tags are found after $isopentag; if any tag is found, no message is displayed; use with flag 1 (good to use in a end tag name program to generate an error message if the tag that was closed contains no tags - example: checkTagUsed(39, RETURN_NOTUSED);)

•64 - immediately after $flags, specify a string to prepend to any message that is generated

•128 - if a tag name is found, save the tag name in the variable $checktagusedtagname

•256 - OBSOLETE; do not use

•512 - if $isopentag is opened, save the line number that it was opened in in the variable $checktagusedopenlinenum (New v4.5091)

•Order for specifying additional parameters after flags: 16, 64

•This function's return value depends on returntype:

•If $returntype is RETURN_NOTUSED, then the return value is undefined. Use this if you do not use the return value of this function.

•If $returntype is RETURN_LISTINDEX, then the return value is 0 if $isopentag is not open, 1 if $isopentag is open but no $tagnamex has been used, and 2 or greater if $isopentag is open and any $tagnamex has been used. If the value is 2 or greater, then the return value indicates the first $tagnamex in the list that has been opened after $isopentag.

•$tagnamex - a tag name to check to see if it has been used after the last, still opened, $isopentag; $tagnamex is only checked to see if it has been used if $isopentag is open

•If no $tagnamex tags are supplied, then any tag after $isopentag in the document structure is considered to match $tagnamex; if a match is made then returns 2