फ़ंक्शन html_entity_decode
फ़ंक्शन html_entity_decode
HTML एंटिटीज़ को उनके संबंधित सिंबल में कनवर्ट करता है।
बेहतर समझ के लिए उदाहरण देखें।
सिंटैक्स
html_entity_decode(string $string, int $flags = ENT_COMPAT, ?string $encoding = null): string
उदाहरण
आइए टैग वाली स्ट्रिंग को कनवर्ट करें:
<?php
$str = '<b>text</b>';
$res = html_entity_decode($str);
echo $res;
?>
कोड निष्पादन का परिणाम:
'<b>text</b>'
उदाहरण
आइए एम्परसेंड वाली स्ट्रिंग को कनवर्ट करें:
<?php
$str = 'test: &';
$res = html_entity_decode($str);
echo $res;
?>
कोड निष्पादन का परिणाम:
'test: &'
यह भी देखें
-
फ़ंक्शन
htmlentities,
जो उल्टा ऑपरेशन करता है -
फ़ंक्शन
htmlspecialchars,
जो समान उल्टा ऑपरेशन करता है