Home >Backend Development >PHP Tutorial >Use php to escape output HTML to JavaScript_PHP tutorial
This article shares with you a small requirement in a personal project. I need to use php to escape and output HTML to JavaScript, so I wrote it. This function is recommended to everyone, I hope everyone likes it.
Recently, I am working on GIS integration for Sky Map. It is necessary to output HTML to JavaScript. It involves code escaping. It is quite troublesome. So I wrote a PHP function
Share it:
?
3 4 5 6
|
function jsformat($str) |