|
Posted by Al13n on 10/13/77 11:31
shaun.demellweek@googlemail.com wrote:
>
><b>I love[/B] php, it is [B]great</b>!
>
>How can I change my code to make it appear as
>
><b>I love</b> php, it is <b>great</b>!
>
>The code I am using is:
>
>$itemtochange =
>ereg_replace("$from1(.*)$from2","$to1\\1$to2",$itemtochange);
>ereg_replace("$from1(.*?)$from2","$to1\\1$to2",$itemtochange);
--the ? after the * makes it "less greedy" -- it'll stop the first time it
sees [\b] rather than the last time.
Navigation:
[Reply to this message]
|