title: how to shorten code involving php and jquery
body: <p>This code is very simple so I feel like it could be shortened by relating the php variable to the jquery function parameter. if you have any ideas, please help. thank you</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  &lt;?php if (is_page($toppageID1)) { ?&gt; 
  $(document).ready(function () {
      Show('1');
  });
  &lt;?php } elseif (is_page($toppageID2)) { ?&gt; 
  $(document).ready(function () {
      Show('2');
  });
  &lt;?php } elseif (is_page($toppageID3)) { ?&gt; 
  $(document).ready(function () {
      Show('3');
  });
  &lt;?php } elseif (is_page($toppageID4)) { ?&gt; 
  $(document).ready(function () {
      Show('4');
  });
  &lt;?php } elseif (is_page($toppageID5)) { ?&gt; 
  $(document).ready(function () {
      Show('5');
  });
  &lt;?php } elseif (is_page($toppageID6)) { ?&gt; 
  $(document).ready(function () {
      Show('6');
  });
  &lt;?php } elseif (is_page($toppageID7)) { ?&gt; 
  $(document).ready(function () {
      Show('7');
  });
  &lt;?php }; ?&gt;
  &lt;/script&gt;
  </code></pre>