I'm looking to write a script in php that scans an html document and adds new markup to a element based on what it finds. More specifically, I was it to scan the document and for every element it searches for the CSS markup "float: right/left" and if it locates it, it adds align="right/left" (based on what it finds). Example:
<img alt="steve" src="../this/that" style="height: 12px; width: 14px; float: right"/>
olur
<img alt="steve" src="../this/that" align="right" style="height: 12px; width: 14px; float: right"/>