newb Posted October 9, 2006 Share Posted October 9, 2006 if a string contains html code, how do you output without it? for example:[code]<?php$string = "<b>hi</b>";echo $string;?>[/code]the string wont be bold, it will just be 'hi' without the bolding. Link to comment https://forums.phpfreaks.com/topic/23394-removing-html/ Share on other sites More sharing options...
tomfmason Posted October 9, 2006 Share Posted October 9, 2006 Take a look at [url=http://us2.php.net/manual/en/function.strip-tags.php]strip_tags[/url]just do something like this[code=php:0]$string = strip_tags('<b>hi</b>');echo $string;[/code] Link to comment https://forums.phpfreaks.com/topic/23394-removing-html/#findComment-106084 Share on other sites More sharing options...
newb Posted October 9, 2006 Author Share Posted October 9, 2006 Oh, ok. Link to comment https://forums.phpfreaks.com/topic/23394-removing-html/#findComment-106114 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.