PHP pass variable to include within include statement?
Hi All
I have the following include file:
<?php include("inc-select-merchants-by-keyphrase.php"); ?>
Currently, I set a $KeyphraseAds variable for it at the top of my php page, to get merchants for the relevant keyphrase, and it displays a table of merchant results.
However, this only allows one table of results on a page, and I would sometimes like to display multiple tables of results, i.e. use the include file more than once, but set a different $KeyphraseAds each time.
Is there a way of setting an include specific variable, maybe within the include statement itself, to allow me to use the same include multiple times on a page but each time displaying different keyphrase results?
I guess what I'm asking is, is there a way to send a variable to a specific instance of a php include?
Many thanks
Accelerator
__________________
WebRef.eu - Web Development Resources for the Online Entrepreneur
|