Saturday, 14 September 2013

Get the value from db and place it in view in codeigniter

Get the value from db and place it in view in codeigniter

am getting values into view when am usin the following code
echo '<pre>';print_r($result1['organization_answer_rating1']);exit;
am getting output as
Array
(
[0] => stdClass Object
(
[organization_answer_rating] => 2.7500
)
)
but when given as
<?php
//echo '<pre>';print_r($result);
//echo '<pre>';print_r($result1);?>
<table class="footable">
<thead>
<tr>
<th style="text-align:center;">Organizational Mean</th>
<th style="text-align:center;">Workgroup Mean</th>
</tr>
</thead>
<tbody>
<?php
//echo '<pre>';print_r($result1['organization_answer_rating1']);exit;
echo "<td
style='text-align:center;'><span>".$result1['organization_answer_rating1']."</span></td>";
echo "<td
style='text-align:center;'><span>".$result1['workgroup_answer_rating1']."</span></td>";
?>
</tbody>
</table>
am getting output as array what was the reason for this what was the wrong
am doing can you please say me thanks.

No comments:

Post a Comment