in reply to Highlight a substring
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Highlight a substring
by ikegami (Patriarch) on Apr 06, 2005 at 15:23 UTC | |
|
Re^2: Highlight a substring
by the_0ne (Pilgrim) on Apr 06, 2005 at 17:02 UTC | |
by ikegami (Patriarch) on Apr 06, 2005 at 18:09 UTC |