Çözme html kişiler sorunu

3 Cevap php

Ben görüntülemek için gereken metin aşağıdaki satırı var

<ul><li>Complementary to cleansing with HY-ÖL®<li>Especially for irritated and sensitive skin<li>Noticeably calms and relaxes the skin</ul>

Ben aşağıdaki yoksa

html_entity_decode('<ul><li>Complementary to cleansing with HY-ÖL®<li>Especially for irritated and sensitive skin<li>Noticeably calms and relaxes the skin</ul>');

metin şu şekilde ou geliyor

* Complementary to cleansing with HY-�L�
* Especially for irritated and sensitive skin
* Noticeably calms and relaxes the skin

sorun HY-ÖL ® lutfen kodlamak çalışır ve daha sonra bu HY-L gibi biter olduğunu

Burada karıştı, lütfen yardım

3 Cevap

Eğer doğru kodlama gönderme olduğunuzu görmek için header-kodlamasını kontrol edin.

Utf-8 kodlama için örnek.

header('Content-Type: text/html; charset=utf-8');

Sen de çıktı istediğiniz karakter kodlamasını belirtmek gerekir:

html_entity_decode('…', ENT_COMPAT, 'UTF-8')

Aksi html_entity_decode varsayılan olarak ISO 8859-1 varsayar.

Için sayfanın kodlama türünü belirlemeyi deneyin utf-8 örneğin:

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />