function node_export_features_ui_textarea_to_array in Node export 7.3
Utility function to convert a text area into a array of trimmed non-blank lines.
Parameters
string $area: The text area value to parse.
Return value
array The parsed array of non-blank trimmed lines found in the area. An empty array is returned if no information found.
2 calls to node_export_features_ui_textarea_to_array()
- node_export_features_ui_query_alter in modules/
node_export_features_ui/ node_export_features_ui.module - Implements hook_query_alter().
- node_export_features_ui_settings_validate in modules/
node_export_features_ui/ node_export_features_ui.pages.inc - Validate and normalize some of the inputs.
File
- modules/
node_export_features_ui/ node_export_features_ui.module, line 72 - Node Export Features UI main module file
Code
function node_export_features_ui_textarea_to_array($area) {
$area = trim($area);
$results = array();
if ($area) {
$lines = explode("\r\n", $area);
foreach ($lines as $key => $value) {
$result = trim($value);
if ($result) {
$results[] = $result;
}
}
}
return $results;
}