0

hi...iam stuck with this code pls help me

here is my controller

public function men_clothing() 
    {
        $data['active_mn']='men_clothing';

        $data['men']=$this->roxmodel->get_category_by_parent($p_id=8);
        $data['kids']=$this->roxmodel->get_category_by_parent($p_id=9);
        $data['galllery']=$this->roxmodel->get_galleryImages($p_id);

    }

my model looks like this

public function get_galleryImages($p_id)
  {
    $this->db->where('category_id',$p_id);

    $query = $this->db->get('gallery')->result();
    return $query;
   /* $this->db->where('gallery.category_id',$p_id);
    $this->db->select('gallery.*,category.id');
    $this->db->join('category','category.parent_id=gallery.category_id');
    return $this->db->get('gallery')->result();
    */
  } 

my view page look like this

<?php foreach($galllery as $row){?>
<img class="primary-image" ima="<?php echo base_url();?>images/<?php echo $row->image;?>" src="<?php echo base_url();?>images/<?php echo $row->image;?>" alt="" />
<img class="secondary-image" ima="<?php echo base_url();?>images/<?php echo $row->image;?>" src="<?php echo base_url();?>images/<?php echo $row->image;?>" alt="" />

<?php }?>

here in the view page i need to display all images comes under men(value name) category..but its not displaying so plaese help me

2
Contributors
3
Replies
12
Views
1 Year
Discussion Span
Last Post by mohammed_22
0

its not shwing any thing on the page then i had used var dumb then it shows array size=0

0

its not shwing any thing on the page then i had used var dumb then it shows array size=0

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.