Hello everone, i have a teams.txt
file there are soccer clubs every team on new line i want to split the country from the club when is inserted into database. The country is the last string ex.FC Barcelona (Spain)
Arsenal (England)
Any help will be appreciated.
I have tried with simple string variable and it works but i do not know how to from a file:
$string = "FC Vardar (Macedonia)";
$split = substr($string, 0, strrpos($string, " "));
echo $split;