Christopher
New member
Ok so the concept of this is simple but I can't get the regex to work.
I'll make this as simple as possible: I need to find this tag <span id="price2"> ???? </span> and replace it (Or better yet, just the text in between this particular span) with a new value. Its kind of like doing innerHTML with Javascript just doing it in PHP.
What I got is this:
$text = "This is the area that has the span in it look... <span id="price2> ??? </span>";
$regex = "/(<span id=\"price2\">){1}[\w\s$.,]+(<\/span>){1}/i";
$swap = ($regex,"Use this now",$text);
It needs to be PHP version 4.0 -> 5.0 sorry. No 5.0+ PHP please.
I'll make this as simple as possible: I need to find this tag <span id="price2"> ???? </span> and replace it (Or better yet, just the text in between this particular span) with a new value. Its kind of like doing innerHTML with Javascript just doing it in PHP.
What I got is this:
$text = "This is the area that has the span in it look... <span id="price2> ??? </span>";
$regex = "/(<span id=\"price2\">){1}[\w\s$.,]+(<\/span>){1}/i";
$swap = ($regex,"Use this now",$text);
It needs to be PHP version 4.0 -> 5.0 sorry. No 5.0+ PHP please.