title: A PHP Error was encountered Severity: Notice Message: Undefined variable: querry_array
body: <p>I tried solving the title but I really wanted to know the solution , oh well the code with the error goes here:</p>
  <pre><code>&lt;?php
  class Schedules extends CI_Controller {
  
  
  function display($query_id = 0, $sort_by = 'event_name', $sort_order = 'asc', $offset = 0) {
      
      $limit = 20;
      $data['fields'] = array(
          'event_id' =&gt; 'ID',
          'event_name' =&gt; 'Title',
          'schedule' =&gt; 'Schedule',
          'date_expired' =&gt; 'Expired',
          'clientname' =&gt; 'Clientname',
          'cost' =&gt; 'Cost'
      );
      $this-&gt;input-&gt;load_query($query_id);
      
      $query_array = array(
          'event_name' =&gt; $this-&gt;input-&gt;get('event_name'),
          'date_expired' =&gt; $this-&gt;input-&gt;get('date_expired'),
          'length_comparison' =&gt; $this-&gt;input-&gt;get('length_comparison'),
          'date_expired' =&gt; $this-&gt;input-&gt;get('date_expired'),
      );
      $data['query_id'] = $query_id;
      
      $this-&gt;load-&gt;model('Schedule_model');
      
      $results = $this-&gt;Schedule_model-&gt;search($querry_array, $limit, $offset,     $sort_by, $sort_order); // this is line number 27 which displays  error
      
      $data['schedules'] = $results['rows'];
      $data['num_results'] = $results['num_rows'];
  &gt; Call to undefined function form_open() in C:\xampp\htdocs\ci\application\views\schedules.php on line 34//Also this error display too, code here:
  
  &lt;?php echo form_open('schedules/search'); ?&gt;//this line is number 34 that display an error
      &lt;div&gt;
          &lt;?php echo form_label('Event Name:', 'event_name'); ?&gt;
          &lt;?php echo form_input('event_name', set_value('event_name'), 'id=&quot;event_name&quot;'); ?&gt;
      &lt;/div&gt;
  
      &lt;div&gt;
          &lt;?php echo form_label('Schedule:', 'schedule'); ?&gt;
          &lt;?php echo form_dropdown('schedule', $category_options, 
              set_value('schedule'), 'id=&quot;schedule&quot;'); ?&gt;
      &lt;/div&gt;
  
      &lt;div&gt;
          &lt;?php echo form_label('Date Expiree:', 'date_expired'); ?&gt;
          &lt;?php echo form_dropdown('length_comparison', 
              array('gt' =&gt; '&gt;', 'gte' =&gt; '&gt;=', 'eq' =&gt; '=', 'lte' =&gt; '&lt;=', 'lt' =&gt; '&lt;') , 
              set_value('length_comparison'), 'id=&quot;length_comparison&quot;'); ?&gt;
          &lt;?php echo form_input('date_expired', set_value('date_expired'), 'id=&quot;date_expired&quot;'); ?&gt;
      &lt;/div&gt;
      
      &lt;div&gt;
          &lt;?php echo form_submit('action', 'Search'); ?&gt;
      &lt;/div&gt;
  
  &lt;?php echo form_close(); ?&gt;
  </code></pre>