title: How to make if / else if into an array?
body: <p>I have to add noindex to some url's, this is my code at the moment: </p>
  
  <pre><code>&lt;?php if ($metanoindex) { ?&gt;
  &lt;meta name="robots" content="noindex,follow" /&gt;
  &lt;?php } elseif ($_SERVER['REQUEST_URI']=='/dolls/1/bestselling' ) { ?&gt;
  &lt;meta name="robots" content="noindex,follow" /&gt;
  &lt;?php } elseif ($_SERVER['REQUEST_URI']=='/dolls/1/bestselling/30' ) { ?&gt;
  &lt;meta name="robots" content="noindex,follow" /&gt; 
  &lt;?php } elseif ($_SERVER['REQUEST_URI']=='/dolls/1' ) { ?&gt;
  &lt;meta name="robots" content="noindex,follow" /&gt; 
  &lt;?php } else { ?&gt;
  &lt;meta name="robots" content="index,follow" /&gt;
  &lt;?php } ?&gt;
  </code></pre>
  
  <p>I wondered if there is a way to make an array of urls instead of repeating "else if" each time.</p>