how to use php show different contents for different countries

you’ll need to use something like GeoIP or IP2Location to automatically find out where in the world a user is…
You can then use something similar to:

PHP Code:
if($location == “GB”){ //Content for users in GB (Great Britain/mainland UK) } elseif($location == “JP”){ // Content for users in Japan } else{ //default content in English, perhaps }