title: PHP - Loading a variable through a URL
body: <p>I'm having trouble getting my head around a concept on a site I'm trying to develop (I'm relatively new to PHP so it's taking me a while).</p>
  
  <p>Basically, I have some html content within a PHP Variable that I'd like to output in a lightbox when clicking a link.</p>
  
  <p>Currently, this works as follows - </p>
  
  <pre><code>echo '&lt;a class="fancybox" id="inline" href="#data' . $limit . '"&gt;Read more&lt;/a&gt;' ;  
  
  echo '&lt;div style="display:none"&gt;&lt;div id="data' . $limit . '"&gt;&lt;h2 class="innertitle"&gt;' . $item['linktitle'] . '&lt;/h2&gt;' . $item['descriptionfull'] . '&lt;/div&gt;&lt;/div&gt;';
  </code></pre>
  
  <p>So what's happening here is that the variable is loading into a div on the page, which is hidden from the end user, clicking the link then loads this data into a lightbox using Fancybox. This works great but as the number of articles on the site increases (and their descriptionfull html) the page itself is getting very large and taking a long time to load.</p>
  
  <p>So what I'd want to achieve if possible is to get the 'read more' link to point to another php file on the site that when loaded will bring in php variable dynamically. This saves the descriptionfull variables from getting loaded on the main page and should therefore only be loaded when the relevant readmore link is clicked.</p>
  
  <p>Is this possible? Cheers.</p>