I have a block of HTML, shown below:
$theWebPage <<< WEBPAGE
<img alt="ZCMS|SCRIPTURE|1COL1ROW" src="./scripture.gif" style="left: 507px; position: absolute; top: 85px;" />
<p><strong>Some descriptive text</strong></p>
<img src="this.gif" alt="An image" />
<img alt="ZCMS|NEWS|3COL1ROW" src="./news.gif" style="left: 18px; position: absolute; top: 127px;" />
I want to parse through the $theWebPage string with PHP and locate all instances of <img> tags that have the special alt="ZCMS|..." substring, and replace it in its entirety with something else. Note, however, that this alt tag can have multiple values, depending on the type of content being replaced, and the style attributes (left and top) will invariably be different for each. The one constant amongst images to be replaced is the alt="ZCMS| portion...