Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

PHP multiple identical variables on page

$
0
0

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!


Viewing all articles
Browse latest Browse all 13200

Trending Articles