Why the following code gives blank output with no errors or Warnings?what to do to print the the words inside database "cheraman" start with letter 'alif'?
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<?php
$dbhost = 'localhost:3306';
$dbuser = 'root';
$dbpass = '';
$conn = mysqli_connect($dbhost, $dbuser, $dbpass);
mysqli_select_db($conn , "cheraman") or die(mysqli_error($conn));
$data = mysqli_query($conn , "SELECT * FROM rootword_meaning") or die(mysqli_error($conn));
$row = mysqli_fetch_assoc($data);
$r=$row['ROOTWORD'];
//echo $r;
$w= str_split($r);
define("n",mb_strlen($r));
$i=0;
while($row == mysqli_fetch_assoc($data))
{
while($i<= n)
{
if($w[n] == 'ا') //this if part is not working.the letter in single quote is arabic.
{
echo "No: ".$row['ID']."<br/>";
echo "<a href=https://www.google.com>Word:".$row['ROOTWORD']."<br/></a>";
}
$i++;
}
}
mysqli_close($conn);
?>
</body>
</html>