Lajos Arpad February 2016
Depends on what does
'india' represent. It might represent the first word before the dot, but after the
$string = 'http://india.domain.com';
echo substring($string, 8, strpos($string, ".") - 8);
Or it might be something else. In general, it is better to specify what you need exactly, otherwise we can do no better than guesswork.