![]() |
![]() |
![]()
Post
#1
|
|
Grupa: Zarejestrowani Postów: 4 Pomógł: 0 Dołączył: 13.11.2008 Ostrzeżenie: (0%) ![]() ![]() |
Wiatjcie mam problem z encjami numerycznymi. Problem polega na tym, że jak ktoś wpisuje tekst do strony cudysłów i znak - zamieniają się na encje numeryczne. Próbowalem wszytkich funkcji by je zmienić przy odczycie z bazy MySQL by zmieniły się w znaki ale nic czami encja jest połączona z wyrazem.
Zastosowalem ta funkcje ale nie dział. ze strony http://pl.php.net/manual/pl/function.html-entity-decode.php function unhtmlentities($string) { // replace numeric entities $string = preg_replace('~&#x([0-9a-f]+);~ei', 'chr(hexdec("\\1"))', $string); $string = preg_replace('~&#([0-9]+);~e', 'chr("\\1")', $string); // replace literal entities $trans_tbl = get_html_translation_table(HTML_ENTITIES); $trans_tbl = array_flip($trans_tbl); return strtr($string, $trans_tbl); } $c = unhtmlentities($a); Proszę o pomoc |
|
|
![]() ![]() |
![]() |
Aktualny czas: 28.09.2025 - 19:29 |