คือว่าผมจะแปลงโค้ด ascii แบบนี้
<a href="#">Mycomsci</a>'; ให้ออกมาเป็นแบบนี้ ไม่ทราบต้องทำยังไงครับ
<a href="#">Mycomsci</a> นั่งงมมานานแล้วครับ ปล.มือใหม่ครับ
ขอบคุณครับ :wanwan017: :wanwan017:
ใช้ unescape
<script language="javascript">document.write(unescape('<a href="#">Mycomsci</a>'))</script>
ขอบคุณครับ
this function
<?php
function htmlkarakter($string)
{
$string = str_replace(array("<", ">", '&', ''', '"','<', '>'), array("<", ">",'&',''','"','<','>'), htmlspecialchars_decode($string, ENT_NOQUOTES));
return $string;
}
?>
Before
<description><div class="google-ad1">
<script type='text/javascript'>
GA_googleFillSlot("EW_News_300x250");
</script>
</div>
after using the function
<div class="google-ad1">
<script type='text/javascript'>
GA_googleFillSlot("EW_News_300x250");
</script>
Edit: อ่านเพิ่มเติม
http://www.php.net/manual/en/function.htmlspecialchars-decode.php
ส่วนนี้สำหรับ PHP นะครับ เสริมไว้ให้