Disclaimer: I am a new comer to Web Design

To Date: I have been passing primary key data from the MySQL database table in to the id="" area from the calendar class library list item that's shown on the calendar when produced, and I have been passing another value connected using the row of their particular primary answer to their email list item too.

Scenario: I am requiring to pass through another value in the same particular row from the primary key in to the class="" from the list item, and I have hit a wall. I might need to produce a new function during my modal, or make a move inside the controller where stated calendar is produced, or I might be totally looking over something completely simple. Regardless, I possibly could apply certain very appreciated help. Many thanks!

P.S. Please tell me if you want any longer information that helped me to out. Many thanks! You are all wonderful!

Model:

class Events_model extends crud_model {

    public function __construct()
    {
        parent::__construct();

        $this->pk = 'id';
        $this->table_name = 'events';
    }

    public function get_events_for_calendar($user_id, $year = FALSE, $month = FALSE)
    {

        if ( ! $year )
        {
            $year = date("Y");
        }

        if ( ! $month )
        {
            $month = date("m");
        }

        $this->db->where("user_id", $user_id);
        $events = parent::get_all();

        $cal_events = array();

        foreach ($events as $e)
        {
            if ( date("Y", $e->date) == $year && date("m", $e->date) == $month)
            {       
                $day = intval( date("d", $e->date));

                //Swap out to change between displaying type or title of events listed -lrussell810

                //$cal_events[$day][$e->id] = $e->type;
                $cal_events[$day][$e->id] = $e->title;
            }
        }
        return $cal_events;
    }

Controller:

$this->load->library('calendar', $config);

        $title['title'] = 'Planner';

        $data = $this->events->get_events_for_calendar($this->end_user->id, $this->uri->segment(4), $this->uri->segment(5));

        $calendar['calendar'] = $this->calendar->generate($this->uri->segment(4), $this->uri->segment(5), $data);

        $this->load->view('public/head_view', $title);
        $this->load->view('user/header_view');
        $this->load->view('user/planner_view', $calendar);
        $this->load->view('user/footer_view');

Calendar Library:

// If more than one event on the same day
                      if (is_array($data[$day]))
                      {
                        $several_events = '';
                        foreach ($data[$day] as $key => $value)
                        {
                          $several_events .= '<li class="" id="'.$key.'">'.$value.'</li>';
                        }
                        $out .= str_replace('{day}', $day, str_replace('{content}', $several_events, $temp));
                      }

Other Calendar Library Information:

// --------------------------------------------------------------------

    /**
     * Initialize the user preferences
     *
     * Accepts an associative array as input, containing display preferences
     *
     * @access  public
     * @param   array   config preferences
     * @return  void
     */
    function initialize($config = array())
    {
        foreach ($config as $key => $val)
        {
            if (isset($this->$key))
            {
                $this->$key = $val;
            }
        }
    }