title: How to  refresh a div in which php code is executing
body: <p>a group images are calling in a div and there we have given an option to rotate images if required. </p>
  
  <p>Actually the image is rotating but it is not showing in the page( without doing 2 or 3 manual page refresh).</p>
  
  <p>I have added </p>
  
  <pre><code> &lt;meta HTTP-EQUIV="Pragma" content="no-cache"/&gt;
   &lt;meta HTTP-EQUIV="Cache-Control" content="no-cache"/&gt;
  </code></pre>
  
  <p>at head</p>
  
  <p>also done</p>
  
  <pre><code>if(isset($_GET['re'])=='re')
  {
  ?&gt;
  
  &lt;script language="JavaScript" type="text/javascript"&gt;
  
  var reloaded = false;
  var loc=""+document.location;
  loc = loc.indexOf("?reloaded=")!=-1?loc.substring(loc.indexOf("?reloaded=")+10,loc.length):"";
  loc = loc.indexOf("&amp;")!=-1?loc.substring(0,loc.indexOf("&amp;")):loc;
  reloaded = loc!=""?(loc=="true"):reloaded;
  
  function reloadOnceOnly() {
      if (!reloaded)
          window.location.replace(window.location+"?reloaded=true");
  }
  reloadOnceOnly(); //You can call this via the body tag if desired
  &lt;/script&gt;
  
  &lt;?php
  }
  </code></pre>
  
  <p>But it is not showing the new rotated or changed image without another manual refresh.</p>
  
  <p>Could you please help me on this?</p>