function sweaver_drush_array_to_string in Sweaver 7
Same name and namespace in other branches
- 6 drush/sweaver.drush.inc \sweaver_drush_array_to_string()
Convert an array to string.
Parameters
$array: A collection of key value pairs.
Return value
$string
1 call to sweaver_drush_array_to_string()
- sweaver_drush_edit_style in drush/
sweaver.drush.inc - Edit a style.
File
- drush/
sweaver.drush.inc, line 442 - Sweaver Drush functions.
Code
function sweaver_drush_array_to_string($array) {
$string = '';
if (is_string($array)) {
$array = unserialize($array);
}
if (is_array($array) && !empty($array)) {
foreach ($array as $key => $value) {
$string .= "{$key} : {$value}\n";
}
}
return $string;
}