I have a php-file called kal_test.php which gives a value to the variable $vbl. This variable is needed in the file called kal_generator.php<
You're likely defining a function or class in kal_generator.php. PHP aborts when you try to redefine such a function or class. Consider putting your code in a function, include that function once and then run the function instead of including a file.
<?php
require_once 'kal_generator.php';
kal_generator("14/09/2011");
kal_generator("21/09/2011");
?>
<?php
function kal_generator($vbl) {
/**
* Here, you should be creating $output
*/
echo <<EOF
<table>
<tr><th>bla</th><th>blabla</th></tr>
EOF;
foreach ($output as $v1) {
echo "<tr>";
foreach ($v1 as $v2) {
echo "<td>$v2</td>";
}
echo "</tr>\n";
}
echo "</table>\n";
}
?>