Welcome Guest, Not a member yet? Register   Sign In
How to separate an array
#31

[eluser]kirtan.n[/eluser]
Is this the output u r expecting
Code:
$this->db->select('tags');
        $this->db->where('aprooved', 'yes');
        $this->db->limit(50);
        $query = $this->db->get('catalog');
        $row = $query->result_array();
        $tags='';
        foreach ($row as $list)
        {
            
            $tagline = explode(', ', $list['tags']);
            foreach($tagline as $tag)
            {
                if($tag!='')
                {
                $tags  .= '#' . $tag . ', ';
                }
            }
        }
echo $tags;
#32

[eluser]JayArias[/eluser]
Code:
A PHP Error was encountered

Severity: Notice

Message: Undefined variable: tags

Filename: models/catalog_model.php

Line Number: 43
#33

[eluser]kirtan.n[/eluser]
corrected the prev post ...use tht code




Theme © iAndrew 2016 - Forum software by © MyBB