title: Updating PHP variable in Zend Framework using AJAX
body: <p>I have a page that generates tiles for 15 of the most recent article. The article count is set on the IndexController and needs to be updated with an AJAX call. The event that will trigger the AJAX call is a change is device orientation, so when a mobile device goes from portrait to landscape view.</p>
  
  <p>I'm able to get this to work outside of Zend Framework but since new to this MVC I'm not quite sure how to access the variable at the controller level.</p>
  
  <p>So for example I have this bit of jQuery for my AJAX call:</p>
  
  <pre><code>var request = $.ajax({
    type: "GET",
    url: "index/get-data",
    data: {tileLayout : "landscape" }
  }).done(function( msg ) {
  });
  
  request.done(function(msg) {
  });
  </code></pre>
  
  <p>And I need to update this variable that sits in the Controller and determines how many tiles are displayed:</p>
  
  <pre><code>$tiles = 15;
  </code></pre>