<?php
$text = 'Sonance Visual Performance Series features an award-winning <a href="">Visual Performance Series</a> low-profile grille that is paintable to blend into the wall or ceiling. With three shapes and sizes, several performance levels, and a range of Sonance Landscape Series specialty /ThinLine application speakers, a consistent look can be achieved for any application in every space.';
$text = '<li class="dropdown-submenu active active-child"><a href="http://local.sonance.com/in-wall-in-ceiling/visual-performance">Visual Performance</a><ul class="level-3 dropdown-menu children-3"><li><a href="http://local.sonance.com/in-wall-in-ceiling/visual-performance#t1">Performance</a></li><li><a href="http://local.sonance.com/in-wall-in-ceiling/visual-performance#t2">Aesthetics</a></li><li><a href="http://local.sonance.com/in-wall-in-ceiling/visual-performance#t3">Installation</a></li></ul></li>';
$skipDictionary = array(
'all' => array(
'Visual Performance',
'ThinLine',
'Extreme',
'Architectural Series',
'Invisible Series',
'Cinema',
'Soundbar',
'Subwoofers',
'Sonance Landscape Series',
'Satellites',
'Subwoofers',
'Systems',
'Sonarray',
'Mariners',
'Medium'
)
);
$replaceArray = array_map(function($val){
return '<span class="notranslate">'.$val.'</span>';
}, $skipDictionary['all']);
foreach($skipDictionary['all'] AS $idx => $search) {
$text = preg_replace('@(\s|\>|^)'.$search.'(\s|$)@', '\1' . $replaceArray[$idx], $text);
}
echo '<div>'.$text.'</div>';