show incorrect result [message #447593] |
Tue, 16 March 2010 05:17 |
ahoussam
Messages: 5 Registered: March 2010
|
Junior Member |
|
|
hello
I used query to get data from oracle like this:
$nrows = oci_fetch_all($stid, $data_res, null, null, OCI_FETCHSTATEMENT_BY_ROW);
i used tow method to display this data such as:php, and php with smarty
first with php file:
foreach ($data_res as $col) {
echo "<tr>\n";
foreach ($col as $item) {
echo " <td>".($item !== null ? htmlspecialchars($item, ENT_QUOTES) : " ")."</td>\n";
}
echo "</tr>\n";
}
I got correct data display , no problems!
second with smarty file, I am passing data to the mStudent variable:
{section name=i start=0 loop=$mStudent}
<tr>
<td>{$mStudent[i].id}</td>
<td>{$mStudent[i].first_name}</td>
<td>{$mStudent[i].second_name}</td>
<td>{$mStudent[i].email}</td>
<td>{$mStudent[i].NOTE}</td>
</tr>
data characters appear in an illegible such as: attashed file
can any one resolve this problem?
thanks
|
|
|
|
|
|