0) { foreach ($glossary_data as $glossary_index => $glossary_value) { $glossary_all_data[] = $glossary_value['id'].'__|__|'.$glossary_value['name']; } $description = implode('[|.|_|.|-|.|]', $glossary_all_data); } } elseif (isset($_REQUEST['glossary_name'])) { $glossaryInfo = GlossaryManager::get_glossary_term_by_glossary_name($_REQUEST['glossary_name']); if (!empty($glossaryInfo)) { /*$description = str_replace( $path_image_search, $path_image, $glossaryInfo['description'] );*/ if (null === $description || 0 == strlen(trim($description))) { $description = get_lang('No results found'); } else { $description = str_replace('class="glossary"', '', $description); } } } echo api_xml_http_response_encode($description);