filename, TRUE); foreach ($icon_data as $icon_set) { if (isset($icon_set['name'])) { $marker_labels[] = "t('" . $icon_set['name'] . "'),"; } } } // Create a .inc file for our info. $gmap_strings_inc_name = drupal_get_path('module', 'gmap') . '/gmap.strings.inc'; // Open our file. $gmap_strings_inc_handle = fopen($gmap_strings_inc_name, 'w'); // Format the data. $label_container .= " $label) { $label_container .= "$label_key" . ' => ' . "$label" . "\n"; } $label_container .= ')'; $label_container .= ";\n"; $label_container .= "return \$marker_labels\n"; $label_container .= '}'; // Write file. if (fwrite($gmap_strings_inc_handle, $label_container) !== 'FALSE') { drupal_set_message(t('File gmap_strings.inc successfully created.')); } ?>