View is showing only first letter of the result value - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: View is showing only first letter of the result value (/showthread.php?tid=29679) |
View is showing only first letter of the result value - El Forum - 04-17-2010 [eluser]Unknown[/eluser] I am new to CI and doing my first project on my local machine using WAMP. The results displayed on my view page show only the first letter of the result value. Can anyone explain why the whole value is not showing up? The result of my view shows this: Code: Array ( [result] => Array ( [shipping_id] => 8 [shipping_name] => Priority Mail [shipping_alias] => PRTM [shipping_default] => 0 ) [title] => Test Title ) The view code looks like this: Code: <body> This is what my controller look s like: Code: class Orders extends Controller { This is what my model looks like: Code: class Orders_model extends Model{ View is showing only first letter of the result value - El Forum - 04-17-2010 [eluser]Unknown[/eluser] Fixed my issue. Evidently, I wasn't working with an array. changes in View: Code: <?php foreach ($result as $val){ ?> changes in Model: Code: function getTestData(){ I know this is a little different form the first version which was only one array, where this is an array of arrays. |