list_extract_allowed_values

function list_extract_allowed_values

list_extract_allowed_values($string, $field_type, $generate_keys)

Parses a string of 'allowed values' into an array.

Parameters

$string: The list of allowed values in string format described in list_allowed_values_string().

$field_type: The field type. Either 'list_number' or 'list_text'.

$generate_keys: Boolean value indicating whether to generate keys based on the position of the value if a key is not manually specified, and if the value cannot be used as a key. This should only be TRUE for fields of type 'list_number'.

Return value

The array of extracted key/value pairs, or NULL if the