Welcome Guest, Not a member yet? Register   Sign In
Calender Problem
#7

[eluser]Solarpitch[/eluser]
Actually... now that the stupid part is past us on this thread... is there any way around achieving this:

Below I'm creating a calender for January. I want every day on the calender to be a link so here's what I tried...


Code:
$year = 2009;

//LOOP THROUGH JANUARY AND RETURN EACH DAY IN THE MONTH
$date = mktime(0,0,0,1,1,$year); //The get's the first of Jan 2009
//$links = array();

//ASSIGN EACH DAY TO THE ARRAY AND CREATE A LINK
for($n=1;$n <= date('t',$date);$n++){
$links[$n] = array($n => 'http://www.mysite.ie/enterprise/dashboard/'.$year.'/'.$n.'/1');
}

//PRODUCE THE CALENDERS
$data['calender'][] = $this->calendar->generate($year, 1, $links[1]);

//SEND TO VIEW
$data['right_box'] = "right_box/calender";
$this->load->view('template/page_1', $data);

the problem is creating I get an error for each link which says

Severity: Notice
Message: Array to string conversion

and the link aappears as
http://www.mysite.ie/enterprise/calender/Array


Messages In This Thread
Calender Problem - by El Forum - 01-14-2009, 06:41 AM
Calender Problem - by El Forum - 01-14-2009, 06:49 AM
Calender Problem - by El Forum - 01-14-2009, 06:54 AM
Calender Problem - by El Forum - 01-14-2009, 08:44 AM
Calender Problem - by El Forum - 01-14-2009, 08:45 AM
Calender Problem - by El Forum - 01-14-2009, 08:55 AM
Calender Problem - by El Forum - 01-14-2009, 10:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB