hi...iamb struggling with this code please help me
my controller is this

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 section is this

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

    $query = $this->db->get('gallery')->result();
    return $query;

  } 

and my view page is this

<?php foreach($galllery as $row){?> <!-- single-product start --> <div class="single-product"> <!-- <span class="sale-text">Sale</span>--> <div class="product-img"> <a href="#"> <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="" /> </a> <div class="action-zoom"> <div class="add-to-cart"> <a href="#" title="Quick View"><i class="fa fa-search-plus"></i></a> </div> </div> <!--  <div class="price-box"> <span class="new-price">$110.00</span> </div>--> </div> <div class="product-content"> <h2 class="product-name"><a href="<?php echo base_url();?>roxcontrol/product_details"><?php echo $row->title;?></a></h2> <p><?php echo $row->description;?></p> </div> </div> <?php }?> <!-- single-product end --> </div> </div>

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

Hi,

first of all, you have to run $this->load->view('page', $data); in your method controller. Also could you indent your code of the view page?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.