Say I have an HTML string with multiple occurrences like below:
<img scr1="xxxx.jpg" src="aaaa.jpg" other_attributes="some_values" />
I want to make the "src" attribute to be replaced by the value of the "src1" attributes inside the same tag. (so that in the example it would have src="xxxx.jpg" instead).
How can I achieve this with PHP?
Thanks a lot!