I have a php variable where the html contents are read as a string in php and I want to remove just the contents of the href and be the other intact.
$string = '<a href="javascrip t:#one">String</a>';
now I want to make this as given below.
<a href="https://bytes.com/">String</a>. Please note that javascript#one is not constant, It is dynamic