title: Codeigniter db select where as an array
body: <p>I have this code i need to use to get results from a database, I'm on codeigniter. This is how the query looks like,</p>
  
  <pre><code>        $this-&gt;db-&gt;select('*');
          $this-&gt;db-&gt;where('broadcast_id', $bid);
          $query = $this-&gt;db-&gt;get('ih_noticeboard');
          $result = $query-&gt;result();
          if($query-&gt;num_rows() &lt; 1){
              $data = "no feed ";
          }else{
              $data = $result;
          }
  </code></pre>
  
  <p>the <code>$bid</code> in the where clause is got from this code,</p>
  
  <pre><code>    $this-&gt;db-&gt;select('broadcast_id');
      $this-&gt;db-&gt;where('broadcast_subscribers', $id);
      $query = $this-&gt;db-&gt;get('ih_broadcastors    ');
      if($query-&gt;num_rows() &lt; 1){
          $data = "user not subscribed to any broadcasting";
      }else{
          $ress = $query-&gt;result();
          foreach ($ress as $row){
              $bid = $row-&gt;broadcast_id;
          }`
  </code></pre>
  
  <p>Now the select uses only one $bid, how can I use the $bid as an array? </p>