View Full Version : Resolved filtering text

03-17-2010, 07:41 AM
Hi im using this code right here to remove the word "(text)" from ever appearing in my seo tag links.

$tagss = explode(" ", $link['display_name']);
foreach( $tagss as $key => $value){
echo "<a href=\"/search/$value\"/>$value</a> ";
} ?>
What im trying to do now is filter underscores "_" from ever appearing. So lets say there is the text link showing as "text_link". What can i add to remove the "_" from the text and make "text_link" explode into 2 seperate links such as "text" and "link"? the word "text_link" is just an example and that word could be any random words. Can somebody help me?

03-17-2010, 09:46 AM
$tagss = explode(" ", str_replace('_', ' ', $link['display_name']));

03-17-2010, 01:19 PM
$tagss = explode(" ", str_replace('_', ' ', $link['display_name']));

Thanks alot. :thumbsup: