SYNOPSISvarstrlst headerItemGetParameterValues(varchar headerItem
[, varchar paramName])
Parameters:
headerItem
- A varchar
raw header itemparamName
- An optional varchar
parameter name
Returns:
varstrlst
decoded list of parameter values
DESCRIPTION
The headerItemGetParameterValues
function returns a list of
parameter value(s) for the parameter named paramName
in
headerItem
, which is a single raw (original encoded) header
item (i.e. one item in a comma-separated values list, if header is
CSV). The returned values are RFC 2047 encoded-word decoded.
If paramName
is not given or is empty, the first/main value of
the header is returned (i.e. the "empty/unnamed" parameter; see
example).
Note that a shortcut function exists for mimeEntity
objects, to obtain the header and parse it for parameters
in one call; see mimeEntityGetHeaderParameterValues
(here).
EXAMPLE<$conType = 'text/html; charset="ISO-8859-1"; name="foo.html"'>
<$ret = (headerItemGetParameterValues($conType))>
Content type: $ret
<$ret = (headerItemGetParameterValues($conType, "charset" ))>
Charset: $ret
The output would be:
Content type: text/html
Charset: ISO-8859-1
CAVEATS
If the header being decoded is a potentially multi-item CSV list
(e.g. "To
" addresses), it should be split via
headerGetItems
(here) first.
SEE ALSOheaderItemGetParameterNames
, mimeEntityGetHeaderParameterValues