How to get pretty HTML source code from PHP generated output?

半世苍凉 提交于 2019-12-01 22:59:31

For more or less clean looking PHP generated code I used " signs for the echo output Strings, wich enables you to use \n and \t or other codes like that to make new Lines or Code indentation. If you need " signs in your output you need to escape them with \". this will output a " but PHP will treat it like a usual character.

I know it is a pain getting a beautiful code this way but at least it makes it readable.

Paul Dixon

You could use the tidy PECL extension - see this related question for examples.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!