Welcome Guest, Not a member yet? Register   Sign In
Calendar: Linked Date
#1

[eluser]Kemik[/eluser]
Hello all,

I want to create a link on every date of the month. Is there any way of doing this without making an array entry for each day of the month? (So 31 dates).

Here's my current code:

Code:
if ($this->uri->segment(4) === FALSE) {
            $y = date('Y');
            $m = date('n');
        } else {
            $y = $this->uri->segment(3);
            $m = $this->uri->segment(4);
        }
        
        $data['dates'] = array(
               1  => base_url() . "index.php/home/index/" . $y . "/" . $m . "/1/");

Thanks.
#2

[eluser]Michael Wales[/eluser]
Determine the number of days in a month, then loop through each day, using array_push() to add the information to the array you are passing to the Calendar library. Should be easy enough in less than 6 lines.




Theme © iAndrew 2016 - Forum software by © MyBB