title: how to load a diferrent php file dynamically based on the browser window's width using jQuery or any other method
body: <p>Hello friends a very novice question as I am very new to programming.</p>
  
  <p>I was browsing the web and found a method to dynamically load a CSS file based on the browser width.</p>
  
  <p><strong>jQuery</strong></p>
  
  <pre><code>function adjustStyle(width) {
      width = parseInt(width);
      if (width &lt; 701) {
          $("#size-stylesheet").attr("href", "css/narrow.css");
      } else if ((width &gt;= 701) &amp;&amp; (width &lt; 900)) {
          $("#size-stylesheet").attr("href", "css/medium.css");
      } else {
         $("#size-stylesheet").attr("href", "css/wide.css"); 
      }
  }
  
  $(function() {
      adjustStyle($(this).width());
      $(window).resize(function() {
          adjustStyle($(this).width());
      });
  });
  </code></pre>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;link rel="stylesheet" type="text/css" href="main.css" /&gt;
  &lt;link id="size-stylesheet" rel="stylesheet" type="text/css" href="narrow.css" /&gt;
  </code></pre>
  
  <p>I want to know, can I use the same to load a <code>php file</code>?</p>
  
  <p>If yes what will be the code look like?</p>
  
  <p>I think we will be required to use something like <code>&lt;?php require_once('http://mysite.com/layouts/ipad.php'); ?&gt;</code> but how do I code it?</p>
  
  <p>Kindly help.</p>
  
  <p>Regards</p>