I have below string
$string = 'id="0000001" did="659" interval="2" media.jpg'
I want to replace 2 (value is dynamic 0 to 1000) in interval tag with 0. How can I do it?
I tried following code but it replaces all
$returnValue = preg_replace('/\\d+/', '0', $string, -1, $count);