string getAttValueEx(int or string $index, int $flags)
•Returns the attribute value of an attribute of the tag, specified by $index. The first attribute value has an index of 1, and is the attribute value for the attribute that also has an index of 1. An index of 0 is the value attached to the tag name which generally should not exist.
•In v11.9914 and above, $index may also be a string that is the attribute name (case insensitive)
•$flags
•1 - get the value after character references have been replaced with the actual characters (in v11.0111+, this is the default if flag 1 or 2 is not set)
•2 - get the value before character references have been replaced with the actual characters
•4 - trim preceding and trailing spaces (New v11.0111)
•8 - don't generate an error if the attribute at $index does not exist, instead just return an empty string (New v11.9942)
•16 - get the value of the nearest attribute named $index (case insensitive; be sure to provide the attribute name, not index) on the current or ancestor element; returns an empty string if not found (New v11.9952)
•Generates an error if the attribute at $index does not exist, because if the attribute doesn't exist, then it can't have a value (unless flag 8 is used).
•Also see: getAttValue[ForStartTag]()