in reply to another tricky one from lol
$string = "pre replace post"; $i = 4; $j = 11; $length = $j - $i; $result = substr($string,0,$i) . "x" x $length . substr($string,$j); print "$result\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: another tricky one from lol
by sfink (Deacon) on Apr 19, 2002 at 20:41 UTC |