function drush_export_ini

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

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


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/
Command callback. Generate site archive file.


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


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;