Anyone?
I have this code...
[start code]
<?
include "generate_calendar.php"; // Calendarfile
$maaned = date(m);
include ("con.php");
$result = mysql_query("SELECT DISTINCT day, month, year FROM Journal where month = $maaned order by id asc")or die (mysql_error());
while($data = mysql_fetch_array($result)) {
$dag[] = $data['day']; //May be used to replace the 1=> shown below
$days[] = $data['year'].$data['month'].$data['day']; //Contains YYYYMMDD and may be used to replace the id=20040601... etc.
} //End of while
#A test on producing $days-array that does not work.. sic!!!
//for($i=1; $i<32; $i++)
//{
//$days = $dag[$i].'=>'.'array('."'kalenderdag.php?id=$days[$i]'".','."'linked-day'".'),';
//echo $days<br>;
//} // End for-loop
#End of test that dunno work.... more sic....
#This below works - but I dunno want to write a line manually - I want it done automatically
$days = array(
1=>array('kalenderdag.php?id=20040601','linked-day'),
2=>array('kalenderdag.php?id=20040602','linked-day'),
3=>array('kalenderdag.php?id=20040603','linked-day'),
);
echo generate_calendar(2004, $maaned, $days, 3, 'http://www.aeris.dk'); // The calendarcall
//How to produce the $days array above - used in the call of generate_calendar-function - using MySQL, so that I dunno need to re-enter this page every time I've made a new post and add the day in the looong array-list?
//All I have to do is to be able to produce the $days array shown in the example above. It doesn't matter where that data comes from, whether a database, the filesystem, etc.
?>
[end code]
Is it possible that somebody know how to DO this? Now I've spent three days on the case.. so I had to realize that I cannot do it alone... 😉
Sincerely - and thanks in addition -
Anya