title: jquery calendar pull information from mysql database
body: <p>I have a jquery calendar and I want to populate this with data from mysql database, my php script works on its own i.e displays data correctly however I am struggling to get this to work with the calendar script. Any ideas anyone?</p>
  
  <p>Here's my code;-</p>
  
  <pre><code>&lt;script&gt;
  
  
  $(document).ready(function() {
  
      $('#calendar').fullCalendar({
          header: {
              left: 'prev,next today',
              center: 'title',
              right: 'month,basicWeek,basicDay'
          },
          defaultDate: '&lt;?php echo date("Y/m/d");?&gt;',
          editable: true,
          eventLimit: true, // allow "more" link when too many events
          events: [
              {
                  id: 999,
                  title: 'Repeating Event',
                  start: '2014-11-16T16:00:00'
              },
  
              {
                  title: 'name',
                  start: '2015-04-27',
                  end:   '2015-04-29',
              },
  
              {
                  title: 'Michael',
                  start: '2015-04-27',
                  end:   '2015-04-27',
              },
              {
                  title: 'Matthew',
                  start: '2015-04-27',
                  end:   '2015-05-01',
              },
              {
                  title: 'Eric',
                  start: '2015-05-04',
                  end:   '2015-05-08',
              }
          ]
      });
  
  });
  </code></pre>
  
  <p></p>
  
  <pre><code>php include('../include/connect.php');
  
  $result = mysql_query("SELECT * FROM holidays ORDER BY id DESC");
  or die(mysql_error()); 
  
   while($row = mysql_fetch_array($result))
   {
  
  echo "  {   title:'" . $row['title'] . "',";
  echo "      start:'" . $row['start'] . "',";
  echo "      end:'" . $row['end'] . "'},";
   }
  </code></pre>