Ordinary ASCII space is 32, but the browser will automatically merge the normal space, that is, if you enter 10 0x20 of space in the HTML page, it may be merged into a space. if you want to render multiple spaces consistently, you need to use the , the encoding for this space is 160, for Western Europeiso-8859- 1 coding standard. In order to restore HTML-encoded content to the original text characters, you can use the Html_entity_decode () method, but that's the problem, usually HTML-encoded content is in UTF8 format,
Html_entity_decode () in the browser UTF8 encoding environment will be into a black square-shaped garbled. Only switch toiso-8859- 1 to be displayed correctly as a space.
So before using Html_entity_decode () , you need to first ReplaceStr_replace(" ","",$str), so you can avoid garbled problems.
Html_entity_decode (), spaces, Garbled problem