Sorry guys I had to put this on hold for while,
Star
I tired your suggestion, but i got the following sintax error
Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in - on line 41 ( the last line of your code), I also had to add delimiters to the other preg_match and first preg_replace but i figured you left that for me to do. It appears the problem arises because the regex pattern stored in the array doesnt have a delimiter?
I tried the following alteration:
Code:
preg_match_all("#<ol>.*?</ol>#",$input,$blocks); //Find all OL's.
$store = $blocks; //Create a duplicate for later use.
foreach ($store as $k=>$v){$store[$k]="#$v#";}
$blocks = preg_replace("#\n#","<li>",$blocks); //Change the blocks.
$input = preg_replace( $store ,$blocks,$input); //Insert the replacements echo $input;
echo $input;
but it only changed the first \n*...:/
any suggestions. Either way thanks for your input on this.
Bookmarks