Welcome Guest, Not a member yet? Register   Sign In
View is showing only first letter of the result value
#2

[eluser]Unknown[/eluser]
Fixed my issue. Evidently, I wasn't working with an array.

changes in View:
Code:
<?php foreach ($result as $val){ ?>
    <h3>&lt;?php echo $val['shipping_id']; ?&gt;</h3>
    <br/>
&lt;?php }  ?&gt;

changes in Model:
Code:
function getTestData(){
        $data = array();
        $q = $this->db->get('shipping',5);
        if($q->num_rows() > 0){
            foreach($q->result_array() as $row){
                $data[] = $row;
            }
        }        
        $q->free_result();
        return $data;
    }

I know this is a little different form the first version which was only one array, where this is an array of arrays.


Messages In This Thread
View is showing only first letter of the result value - by El Forum - 04-17-2010, 03:36 PM
View is showing only first letter of the result value - by El Forum - 04-17-2010, 08:39 PM



Theme © iAndrew 2016 - Forum software by © MyBB