fai così:

codice:
$var1 = licenza;
$row[testo] = str_replace($var1, "<a href=\"#\">$var1</a>", $row[testo]);
ciao,
jack.