function drush_export_ini

8.0.x drush.inc drush_export_ini($ini)
6.x drush.inc drush_export_ini($ini)
7.x drush.inc drush_export_ini($ini)
4.x drush.inc drush_export_ini($ini)
5.x drush.inc drush_export_ini($ini)
master drush.inc drush_export_ini($ini)

Generate an .ini file. used by archive-dump."

Parameters

array $ini: A two dimensional associative array where top level are sections and second level are key => value pairs.

Return value

string .ini formatted text.

1 call to drush_export_ini()
drush_archive_dump in commands/core/archive.drush.inc
Command callback. Generate site archive file.

File

includes/drush.inc, line 135
The drush API implementation and helpers.

Code

function drush_export_ini($ini) {
  $output = '';
  foreach ($ini as $section => $pairs) {
    if ($section) {
      $output .= "[$section]\n";
    }

    foreach ($pairs as $k => $v) {
      if ($v) {
        $output .= "$k = \"$v\"\n";
      }
    }
  }
  return $output;
}