0) { foreach ($glossary_data as $glossary_index=>$glossary_value) { $glossary_all_data[]=$glossary_value['id'].'__|__|'.$glossary_value['name']; } $glossary_all_data=implode('[|.|_|.|-|.|]',$glossary_all_data); echo api_xml_http_response_encode($glossary_all_data); } } elseif(isset($_POST['glossary_name'])) { $my_glossary_name=Security::remove_XSS($_POST['glossary_name']); $my_glossary_name=api_convert_encoding($my_glossary_name,$charset,'UTF-8'); $my_glossary_name=trim($my_glossary_name); $glossary_description=GlossaryManager::get_glossary_term_by_glossary_name($my_glossary_name); $glossary_description=str_replace($path_image_search,$path_image,$glossary_description); if (is_null($glossary_description) || strlen(trim($glossary_description))==0) { echo api_xml_http_response_encode(get_lang('NoResults')); } else { echo api_xml_http_response_encode($glossary_description); } } else { echo api_xml_http_response_encode(get_lang('NoResults')); }