Welcome Guest, Not a member yet? Register   Sign In
Little question about output
#1

[eluser]VivaUkraine[/eluser]
In my controller i've code for retriving news from database :
Code:
$content = $this->db->get('news');

and i view i've a code like this.
Code:
<?foreach ($content->result() as $row):?>        
            <div class="item">
                
                <h1>&lt;?=$row->title?&gt;</h1>
                <div class="descr">&lt;?=$row->date?&gt;</div>
                &lt;?=$row->content?&gt;
                </div>
        &lt;?php endforeach; ?&gt;

The problem is that i want to do some replacements in $row->content variable. For ex. i want to replace all '&lt;code&gt;' with '<code>' and all '&lt;/code&gt;' with '</code>' tags. I dont want to do this in view file.... How can i do it in Controller ?


Messages In This Thread
Little question about output - by El Forum - 06-25-2007, 01:59 PM
Little question about output - by El Forum - 06-25-2007, 02:16 PM
Little question about output - by El Forum - 06-26-2007, 06:34 AM
Little question about output - by El Forum - 06-26-2007, 08:59 AM
Little question about output - by El Forum - 06-26-2007, 09:02 AM
Little question about output - by El Forum - 06-26-2007, 10:00 AM
Little question about output - by El Forum - 08-08-2007, 05:21 PM
Little question about output - by El Forum - 08-08-2007, 06:17 PM
Little question about output - by El Forum - 08-08-2007, 06:19 PM



Theme © iAndrew 2016 - Forum software by © MyBB