title: PHP making first letter an image
body: <p>I need an HTML-safe function which will change a first letter of the content to the image source.</p>
  
  <p>So if my content will be: <code>"Hello World!</code>" the output will look like:
   <code>"&lt;img src="/images/letters/H.png" alt="H"/&gt;ello"</code></p>
  
  <p>I've tried something like:</p>
  
  <pre><code>$content = '&lt;img src="/images/letters/'.$content[0].'.png" /&gt;'.substr($content, 1); 
  </code></pre>
  
  <p>But I've heard this way isn't safe for HTML due to characters like <code>&lt;</code> and <code>&gt;</code>.</p>