PHP页面上有多个相同的变量

I have a page on a website I am building, that has a row of 4 div blocks that each link to the page they grab information from.

So in context, I have 4 div blocks with a Country name, country img, country desk limited to 100 characters and a 'read more' button.. All the information of this div is taken from a country_name.php file.

BUT, I have 4 different blocks for each different country. So each country has its own country_name.php file with the same variables, just different values.

My questions is, is there a way to include each of the 4 php files so I can include the variables on my page to echo the information, but as the variable names for each country are the same, will I have to start and stop the php include. After the stop point, no more variables from that php file will be outputted.

If this is the solution, how?! I have no idea how to do this or the best way to approach this problem? Can anyone help me out here?

Thank you!

try to create an array of country names representing your file names

ie:

$countries = array(
  "united_kingdom", 
  "south_korea", ...);

then

$country_values = array();

foreach($countries as $country)
{
  include $country . ".php";
  $country_values[$country] = array($countryName, $desc);
}

and then you can access your data like

foreach($countries as $your_desired_country)
{
  //$your_desired_country = "south_korea";
  list($countryName, $desc) = $country_values[$your_desired_country];
  echo "<div>Country name: $countryName</div>";
  echo "<div>Description: $desc</div>";
}

In your situation, I would just name my variable differently in the 4 php files and include them.