$trans = [
'Jack' => '<a href="http://www.jack.com">Jack</a>',
'Jill' => '<a href="http://www.jill.com">Jill</a>',
'Romeo' => '<a href="http://www.romeo.com">Romeo</a>',
];
$description = "Jack and Jill are friends. They want to go to France. They've met Romeo over there.";
$result = strtr($description, $trans);
$names = ['Jack', 'Jill', 'Romeo'];
$description = "Jack and Jill are friends. They want to go to France. They've met Romeo over there.";
$result = preg_replace('/('.implode('|', $names).')/', '<a href="http://www.$1.com">$1</a>', $description);
// or
$result = preg_replace_callback('/('.implode('|', $names).')/', function ($word) {
return '<a href="http://www.'.strtolower($word[1]).'.com">'.$word[1].'</a>';
}, $description);