Jump to content

Strip text for rss


uknowho008

Recommended Posts

<?php

$str = "abcd-efghi-jklmno-p";

$str = str_replace("-", "", $str); // abcdefghijklmnop

?>

 

And to remove a series of characters:

 

<?php

$remove = array("-", "+", "<", ">");
$string = "-a+b<c>d";

foreach($remove as $search) {
$string = str_replace($search, "", $string);
}

echo $string; // abcd

?>

Link to comment
https://forums.phpfreaks.com/topic/52984-strip-text-for-rss/#findComment-261707
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.