Page 1 of 1

Question on strip_tags

Posted: Sun Jun 28, 2009 5:32 pm
by epodismo
I would like to use the <INCLUDE> function to include an HTML page into a php one.

The problem is that the HTML tags in the HTML Page (font, font color and font size, in particular) are breaking the template of my php page.

Is there a way to use the strip_tags function to clean, not a string, but the content of a specific page? In other words, I would like to use something like

strip_tags(http://www.test.com/page.html);

rather than

strip_tags($text);

If this is not possible, can someone point me to a solution that will allow me to change the font, font color and font size when importing HTML content with INCLUDE? Thanks.

Re: Question on strip_tags

Posted: Sun Jun 28, 2009 7:37 pm
by requinix
Use file_get_contents to read the file into a string, use strip_tags on it, then echo or print it wherever you want.

Re: Question on strip_tags

Posted: Sun Jun 28, 2009 9:52 pm
by epodismo
Thank you much! Works!