I’m using a PHP script to link each word of the string:
<?
$str = "hello<br> guys good man";
$arr = explode(' ', $str);
foreach($arr as $value){
echo '<a href="http://www.dumbsearch.com/now/searchcompleted.php?q='.$value.'">'.$value.'</a>';
}
?>
How do I link each word of the string $str without linking the <br>s?
You can just use
preg_replaceOutput