I have a directory of files who's main purpose is to store php variables for inclusion into other files in the site. Each file contains the same set of variables, but with different values.
for example:
event1.php
<?php
$eventActive = 'true';
$eventName = My First Event;
$eventDate = 01/15;
?>
event2.php
<?php
$eventActive = 'true';
$eventName = My Second Event;
$eventDate = 02/15;
?>
In addition to calling these variables in other pages, I want to create a page that contains a dynamic list, based on the variables stored in each file within the directory.
Something like (basic concept):
for each file in directory ('/events') {
if $eventActive = 'true'{
<p><? echo $eventName ?></p>
}
}
What is the best way to do this?