Encoding issue, coverting & to & for html using php

后端 未结 4 801
無奈伤痛
無奈伤痛 2021-02-19 07:37

I have a url in html:


I need to turn it into a string exactly as:



        
4条回答
  •  醉话见心
    2021-02-19 08:01

    Use htmlspecialchars_decode. Example straight from the PHP documentation page:

    $str = '

    this -> "

    '; echo htmlspecialchars_decode($str); //

    this -> "

提交回复
热议问题