We can do it in two ways
i) using Regular Expressions
$message = ereg_replace('<[^>]+>', ' ', $message);
It replace all html tags with blank space
ii) using strip_tags function
syntax: string strip_tags ( string $str [, string $allowable_tags ] )
eg1: strip_tags($message);
it replaces all html tags with blank space
eg2: strip_tags($message, '< div>< img>');
It replaces all html tags with blank space except img and div tag
We can do it in two ways i)
Wed, 06/30/2010 - 16:39 — bandariWe can do it in two ways
i) using Regular Expressions
$message = ereg_replace('<[^>]+>', ' ', $message);
It replace all html tags with blank space
ii) using strip_tags function
syntax: string strip_tags ( string $str [, string $allowable_tags ] )
eg1: strip_tags($message);
it replaces all html tags with blank space
eg2: strip_tags($message, '< div>< img>');
It replaces all html tags with blank space except img and div tag