• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem drop -down dynamically

#2
Well the easiest without model is

PHP Code:
<?php

//in some controller

function method_name(){
 
 $data['rows'] = $this->db->select('id, name')->get('users');
 
 $this->load->view('some_view'$data);

PHP Code:
<!-- some view -->

<?
php foreach($rows->result_array() as $row): ?>
  <?php echo $row['id']; ?>
  <?php echo $row['name']; ?>
<?php 
endforeach; ?>
<!-- just add the HTML and you are ready--> 
Reply


Messages In This Thread
problem drop -down dynamically - by Delta-51 - 05-29-2015, 11:24 AM
RE: problem drop -down dynamically - by Athov - 05-30-2015, 05:07 AM
RE: problem drop -down dynamically - by Delta-51 - 05-31-2015, 11:51 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.