I want to include php variable $i to a function name having parameters
for($i=1; $i<=50; $i++) {
$currentMonth = date("F");
/* draws a calendar */
function draw_calendar($month,$year,$per_day_chu){
$currentDayOfMonth = date("j");
/* draw table */
$calendar = '<table cellpadding="0" cellspacing="0" class="calendar">';
/* table headings */
$headings = array('Su','Mo','Tu','Wed','Th','Fr','Sa');
$calendar.= '<tr class="calendar-row"><td class="calendar-day-head">'.implode('</td><td class="calendar-day-head">',$headings).'</td></tr>';
/* days and weeks vars now ... */
$running_day = date('w',mktime(0,0,0,$month,1,$year));
$days_in_month = date('t',mktime(0,0,0,$month,1,$year));
$days_in_this_week = 1;
$day_counter = 0;
$dates_array = array();
/* row for week one */
$calendar.= '<tr class="calendar-row">';
return $calendar;
}
echo $currentMonth.", ".date("Y");
echo draw_calendar(date("m"), date("Y"), $per_day_chu);
}
in the above code I want to make the function name as function draw_calendar$i($month,$year,$per_day_chu){ and function call as echo draw_calendar(date("m"), date("Y"), $per_day_chu);
Is there any way to achieve this. I have no idea how to set this up. Thankyou.