In a PHP variable a mixed language context is present. An example is below:
$variable="This is sample text I am storing in the variable. இதன் கூடவே மற்ற மொழி எழுத்துக்களும் உள்ளன"
So the variable $variable
contains both English and other language (Tamil in the above example).
Now I need to add a tag with class something enclosing the Tamil text such as:
$variable="This is sample text I am storing in the variable. <span class='tamil'>இதன் கூடவே மற்ற மொழி எழுத்துக்களும் உள்ளன</span>"
How to omit the English letters and punctuation symbols and add <span>
to other language sentence completely or paragraph?