Hi everyone
This is how I created my table:
CREATE TABLE heb
(
remark VARCHAR(100) collate utf8_unicode_ci
);
This is how that table is displayed with phpadmin:
Here is how I added Hebrew value to the field in that table:
INSERT INTO heb (remark) SELECT 'אבג';
In order to see the field’s value on a web page I use the following PHP code:
<?php // heb.php
require_once 'myInitial.php';
require_once 'myLogin.php';
MYSQLI_SET_CHARSET($myConnection,'UTF8');
$hebQUE = "select * from heb";
$myResult = $myConnection->query($hebQUE);
if (!$myResult) die ("Database access failed: " . $myConnection->error);
$numOfRows = $myResult->num_rows;
echo <<<_END
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
_END;
for ($j = 0 ; $j < $numOfRows ; $j++)
{
$myResult->data_seek($j);
$row = $myResult->fetch_array(MYSQLI_ASSOC);
echo <<<_END
{$row["remark"]}
_END;
}
$myResult->close();
$myConnection->close();
?>
Here is what I get on my display when I upload that page:
Gibrish…
Can anyone show me how to format a column in a MySQL table to show values in Hebrew?
Thanks