...charcters correctly? i'm connecting to oracle 8i database using php, but when i try to make a simple query the result is displayed in strange characters instead of arabic characters, the php and apache are set right i guess, as i can connect to mysql database and read or write arabic characters in a perfect way, i also edited the registry entry
NLS_LANg='american_america.AR8MSWIN1256'
here's the code i'm using:
<?
//connect to database
$conn = oci_connect('user', 'pass', '127.0.0.1:1521/ORA', 'AR8MSWIN1256');
if (!$conn) {
$e = oci_error();
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}else{
echo "Successfully connected";
}
//query database
$stid = oci_parse($conn, 'SELECT * FROM employees');
oci_execute($stid);
echo "<table border='1'>\n";
while ($row = oci_fetch_array($stid, OCI_BOTH)) {
echo "<tr>\n";
foreach ($row as $item) {
echo " <td>" . ($item !== null ? htmlentities($item, ENT_QUOTES) : "*") . "</td>\n";
}
echo "</tr>\n";
}
echo "</table>\n";
?>
i hope anybody could give me hint here
NLS_LANg='american_america.AR8MSWIN1256'
here's the code i'm using:
<?
//connect to database
$conn = oci_connect('user', 'pass', '127.0.0.1:1521/ORA', 'AR8MSWIN1256');
if (!$conn) {
$e = oci_error();
trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}else{
echo "Successfully connected";
}
//query database
$stid = oci_parse($conn, 'SELECT * FROM employees');
oci_execute($stid);
echo "<table border='1'>\n";
while ($row = oci_fetch_array($stid, OCI_BOTH)) {
echo "<tr>\n";
foreach ($row as $item) {
echo " <td>" . ($item !== null ? htmlentities($item, ENT_QUOTES) : "*") . "</td>\n";
}
echo "</tr>\n";
}
echo "</table>\n";
?>
i hope anybody could give me hint here