title: How to decode a base64 string (gif) into image in PHP / HTML
body: <p>I have a base64 encoded string that I would like to convert into an image in PHP / HTML. </p>
  
  <p>Here is what I have: </p>
  
  <pre><code>$data = "R0lGODdhAAGAAKIAAP38+/3h3cjN5P3HwgAAAP8AoP8AGv8EIywAAAAAAAGAAAAD.....";
  echo base64_decode($data);
  </code></pre>
  
  <p>// OR </p>
  
  <pre><code>echo '&lt;img src="data:image/gif;base64,' . base64_decode($data) . '" /&gt;';
  </code></pre>
  
  <p>None of those work. Any suggestions?</p>
  
  <p>Much appreciated!
  Catalin</p>