Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

mailparse_rfc822_parse_addresses(3) [php man page]

MAILPARSE_RFC822_PARSE_ADDRESSES(3)					 1				       MAILPARSE_RFC822_PARSE_ADDRESSES(3)

mailparse_rfc822_parse_addresses - Parse RFC 822 compliant addresses

SYNOPSIS
array mailparse_rfc822_parse_addresses (string $addresses) DESCRIPTION
Parses a RFC 822 compliant recipient list, such as that found in the To: header. PARAMETERS
o $addresses - A string containing addresses, like in: Wez Furlong <wez@example.com>, doe@example.com Note This string must not include the header name. RETURN VALUES
Returns an array of associative arrays with the following keys for each recipient: +---------+---------------------------------------------------+ | | | |display | | | | | | | The recipient name, for display purpose. If this | | | part is not set for a recipient, this key will | | | hold the same value as address. | | | | | | | |address | | | | | | | The email address | | | | | | | |is_group | | | | | | | | | | TRUE if the recipient is a newsgroup, FALSE oth- | | | erwise. | | | | +---------+---------------------------------------------------+ EXAMPLES
Example #1 mailparse_rfc822_parse_addresses(3) example <?php $to = 'Wez Furlong <wez@example.com>, doe@example.com'; var_dump(mailparse_rfc822_parse_addresses($to)); ?> The above example will output: array(2) { [0]=> array(3) { ["display"]=> string(11) "Wez Furlong" ["address"]=> string(15) "wez@example.com" ["is_group"]=> bool(false) } [1]=> array(3) { ["display"]=> string(15) "doe@example.com" ["address"]=> string(15) "doe@example.com" ["is_group"]=> bool(false) } } PHP Documentation Group MAILPARSE_RFC822_PARSE_ADDRESSES(3)

Check Out this Related Man Page

PARSE_INI_STRING(3)							 1						       PARSE_INI_STRING(3)

parse_ini_string - Parse a configuration string

SYNOPSIS
array parse_ini_string (string $ini, [bool $process_sections = false], [int $scanner_mode = INI_SCANNER_NORMAL]) DESCRIPTION
parse_ini_string(3) returns the settings in string $ini in an associative array. The structure of the ini string is the same as the php.ini's. PARAMETERS
o $ini - The contents of the ini file being parsed. o $process_sections - By setting the $process_sections parameter to TRUE, you get a multidimensional array, with the section names and settings included. The default for $process_sections is FALSE o $scanner_mode - Can either be INI_SCANNER_NORMAL (default) or INI_SCANNER_RAW. If INI_SCANNER_RAW is supplied, then option values will not be parsed. As of PHP 5.6.1 can also be specified as INI_SCANNER_TYPED. In this mode boolean, null and integer types are preserved when possible. String values "true", "on" and "yes" are converted to TRUE. "false", "off", "no" and "none" are considered FALSE. "null" is converted to NULL in typed mode. Also, all numeric strings are converted to integer type if it is possible. RETURN VALUES
The settings are returned as an associative array on success, and FALSE on failure. NOTES
Note There are reserved words which must not be used as keys for ini files. These include: null, yes, no, true, false, on, off, none. Values null, off, no and false result in "", and values on, yes and true result in "1", unless INI_SCANNER_TYPED mode is used. Char- acters ?{}|&~![()^" must not be used anywhere in the key and have a special meaning in the value. SEE ALSO
parse_ini_file(3). PHP Documentation Group PARSE_INI_STRING(3)
Man Page