title: If is domain, display this array
body: <p>Have two arrays. One shuffles images, other one has no shuffle. When you go to the website, it's supposed to display images in a random order. That works. Now, I'd like it if you're being forwarded from this other domain that it displays the other array with no shuffle.</p>
  
  <p>Here's my array with no shuffle:</p>
  
  <pre><code>&lt;?
  
  $items1 = array(
  
      array('image'=&gt;'/images/logos/1.png', 'link' =&gt; 'http://www.blah.com', 'text' =&gt; 'blah'),
      array('image'=&gt;'/images/logos/2.png', 'link' =&gt; 'http://www.blah.com', 'text' =&gt; 'blah'),
      array('image'=&gt;'/images/logos/3.png', 'link' =&gt; 'http://www.blah.com', 'text' =&gt; 'blah'),
      array('image'=&gt;'/images/logos/4.png', 'link' =&gt;     
  
      );
  
  ?&gt;
  </code></pre>
  
  <p>Here's me trying an if else statement to display correct array:</p>
  
  <pre><code>&lt;?php $domain = "http://www.blahblah.com";
          if ($domain == blahblah.com)
          { echo '&lt;?foreach($items1 as $i1){?&gt;
            &lt;div&gt;
                &lt;a href="&lt;?=$i1['link'];?&gt;"&gt;&lt;img width="400" height="200" src="&lt;?=$i1['image'];?&gt;"&gt;&lt;/a&gt;
            &lt;/div&gt;
         &lt;? } ?&gt;'; }
          else
          { echo '&lt;?foreach($items as $i){?&gt;
            &lt;div&gt;
                &lt;a href="&lt;?=$i['link'];?&gt;"&gt;&lt;img width="400" height="200" src="&lt;?=$i['image'];?&gt;"&gt;&lt;/a&gt;
            &lt;/div&gt;
         &lt;? } ?&gt;'; }
         ?&gt;
  </code></pre>
  
  <p>Guide me to the light people! Thanks</p>
  
  <p><strong>greg0ire</strong>> code suggestion:</p>
  
  <pre><code>&lt;?php $domain = "http://www.blahblah.com";
      if ($domain == "http://www.blahblah.com"):// use alternative syntax in templates
        foreach($items1 as $i1): // do not try to "echo 'foreach'" ?&gt;
        &lt;div&gt;
            &lt;a href="&lt;?=$i1['link'];?&gt;"&gt;&lt;img width="400" height="200" src="&lt;?=$i1['image'];?&gt;"&gt;&lt;/a&gt;
        &lt;/div&gt;
     &lt;?php 
        endforeach;
      else:
        foreach($items as $i):?&gt;
        &lt;div&gt;
            &lt;a href="&lt;?=$i['link'];?&gt;"&gt;&lt;img width="400" height="200" src="&lt;?=$i['image'];?&gt;"&gt;&lt;/a&gt;
        &lt;/div&gt;
     &lt;?php 
         endforeach;
       endif;?&gt;
  </code></pre>