I have a variable that contains the following text in PhP:
$description = "Flash <a href=\"http://www.aaa.com/\">this coupon</a> <br > <a href="http://www.ggg.com/">Visit here</a> for details <br >";
How do i add the
target="_blank"
that missing on the $description
variable?
So the result will becomes the following:
$description = "Flash <a href=\"http://www.aaa.com/\" target="_blank">this coupon</a> <br > <a href="http://www.ggg.com/" target="_blank">Visit here</a> for details <br >";
I am looking for solution that the variable $description was recorded by user accidentally. But I need the system to find out and correct it by adding the target="blank" into the existing variable and update the record.