title: PHP display images if $value = $string?
body: <p>I need to know if there's a quickest and efficient way to display one or more images if <code>$value == $string</code></p>
  
  <p>For example: I have an cell which only contains 3 single string: <code>'r o g'</code>, if user put <code>ro</code> it will output <code>&lt;img src="red.gif"&gt;</code> and <code>&lt;img src="orange.gif"&gt;</code> So it could be random if user insert <code>gr</code> then it will display <code>&lt;img src="green.gif"&gt;</code> and <code>&lt;img src="red.gif"&gt;</code></p>
  
  <p>Right now I can only think something like... </p>
  
  <pre><code>&lt;?php $red = "&lt;img src="red.gif"&gt;";
  $orange = "&lt;img src="orange.gif"&gt;";
  if( $cell1 == $red ){ echo $red;}
  if( $cell1 == $red &amp;&amp; $orange ){ echo $orange.$red;}
  etc...
  </code></pre>
  
  <p>This method might works but has to provide too many possibility and I believe there's a shorter and efficient to do that, but I haven't got any idea because still I'm learning PHP</p>