How To Strip Out or remove all Html From String Through Php
- Forums
- PHP
- How To Strip Out or remove all Html From String Through Php
This Page Contains information about How To Strip Out or remove all Html From String Through Php By mable in category PHP with 1 Replies. [1255], Last Updated: Sat May 18, 2024
mable
Fri Feb 27, 2009
1 Comments
344 Visits
hello, i was wondering if you can show me something
im kinda new to php and i want to be able to remove out the html tags only from a string using php but i started to make a function but sometimes it works and sometimes it doesnt work and its getting complicated so i finally decided to give up and seek your help.
i see that you also have a wallpaper site and i was wondering if you can provide me with some support. i know im not paying you but if you would be so kind and guide me in the right direction i would really appreciate it very much
if you want to be able to remove only the html tags from a variable in php its easy, there is a function built-in to php that you can use, its called:
strip_tags()
as you can see, this function will work great for what you want to do.
for example lets say i have a string:
$string = '<a href="http://www.wallpaperama.com">Wallpaperama Wallpapers</a>';
$string = strip_tags($string );
echo $string ;
?>
try it,
hope that helps
https://www.wallpaperama.com/forums/how-to-strip-out-html-from-string-through-php-t7153.html