title: Manipulating Thai Characters in PHP
body: <p>I'm struggling getting Thai characters and PHP working together. This is what I'd like to do:</p>
  
  <pre><code>&lt;?php
     mb_internal_encoding('UTF-8');
     $string = "ทาง";
     echo $string[0];
  ?&gt;
  </code></pre>
  
  <p>But instead of giving me the first character of $string (ท), I just get some messed up output. However, displaying $string itself works fine.</p>
  
  <p>File itself is of course UTF-8 as well. Content-Type in Header is also set to UTF-8. I changed the neccessary lines in php.ini according to <a href="http://chinesenotes.com/chinese_text_manipulating.php" rel="nofollow">this site</a>.</p>
  
  <p>utf8_encoding() and utf8_decoding() also don't help. Maybe any of you has an idea?</p>