I have a string with more than 1000+ symbols, and I need to find substring, cut it from curret position and put into another pisition on same string.
P.S. Sorry for my bad english.
//I have
$string = "< p>< img class='classes' src='https://example.com/img/img.jpg' atl='img'>< /p>";
// I need
$string = "< p>< img class='classes' data-src='https://example.com/img/img.jpg' src=' ' atl='img'>< /p>";
I need find in $string src, cut the link and place it to same but in data-src