title: PHP difference between Single-byte strings and Multi-byte strings
body: <p>For dummies, in PHP what is the difference between single-byte strings and multi-byte strings and in which situations should we consider one or another?</p>
  
  <blockquote>
    <p>For single-byte strings (e.g. US-ASCII, ISO 8859 family, etc.) use
    substr and for multi-byte strings (e.g. UTF-8, UTF-16, etc.) use
    mb_substr:</p>
  
  <pre><code>// singlebyte strings
  $result = substr($myStr, 0, 5);
  // multibyte strings
  $result = mb_substr($myStr, 0, 5);
  </code></pre>
  </blockquote>
  
  <p>For instance, if I plan to develop something to be used in china, do I need to adopt any special measures because of their special characters ? Isnt' Utf-8 encoding good enough?</p>