I am having a heck of a time replacing the data between two tags. I can't figure out the regex that will match this pattern. My tags are simply <!-- Model # Start --> and <!-- Model # End -->
Code:
$products[''.$row[0].''][2] = preg_replace("/(<!-- Model # Start -->).*(<!-- Model # End -->)/i", "$1$2", $products[''.$row[0].''][2]);
echo $products[''.$row[0].''][2] . "\n";
Data: $products[''.$row[0].''][2]
Economical. 7 mils thick, tough & stretchy. Each roll cellophane wrapped. UL listed.
<!-- Model # Start -->
<p style='text-align: right;'>16736</p>
<!-- Model # End -->
$products[''.$row[0].'']. Trying to get something like(string)cast?