Question: can you obfuscate html with php?
Answer: No, there's no way of obfuscating HTML using PHP or for that matter, even JavaScript. The browser needs to be able to parse HTML to render the web page. The user can view all the HTML code that the server sends to the browser, even elements that are hidden and/or elements that are dynamically loaded.