title: PHP reads only first 8 characters from a table
body: <p>I am using a MySQL table which contains Unicode  Malayalam strings. While reading the table using PHP, only the first 8 characters are stored / read in the fetched array.  </p>
  
  <p>Although the full string is present in the field the balance parts are not stored in the array. The field is string Varchar(50).<br>
  By default the database character set is set to utf8mb4.
  PHP Code is as follows:</p>
  
  <pre><code>    $con = mysql_connect("localhost","root") or die ();
  
      $db=mysql_select_db("drivingtest",$con);    //connects database
      mysql_set_charset('utf8mb4',$con);
      $query1="select * from dt_mst where quest_no != ".$row." ORDER BY RAND() limit 1";
      $result=mysql_query($query1) or die(mysql_error());
      $row = mysql_fetch_array($result);
      echo trim($row[2]);
  </code></pre>
  
  <p>shows only the fist 8 characters of the string</p>