my $string1 = 'realy long string of html'; my $string2 = 'long'; my $index = index($string1, $string2); while($index > 0){ substr($string1, $index, length($string2), '<b>'.$string2.'</b>'); $index = index($string1, $string2, ($index + length($string2))); }
A truely compassionate attitude towards other does not change, even if they behave negatively or hurt you
His Holiness, The Dalai Lama
In reply to Re: Highlight a substring
by JediWizard
in thread Highlight a substring
by MonkPaul
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |