PhoenixBlue PhoenixBlue - 2 months ago 7x
PHP Question

output html page after rendering

Good day all!

I would like to be able to get contents of an HTML document after rendering, using PHP. example, if I have this HTML document:

/* some dummy code here*/
<a href="some_links"> click here friend </a>
<input type="button" />
<p>Lorem ipsum dolor sit atmen</p>

the output of the function should look like:

click here friend

Lorem ipsum dolor sit atmen

Thanks in advance for your help!
Note: please do not care much about this HTML code, it's just an example


Output buffering should do the job:


all of your HTML

   $content = ob_get_content();
    echo strip_tags($content);