title: How to connect bootstrap year calendar with mysql base
body: <p>I got problem with connecting bootstrap year calendar from bootstrap-year-calendar.com with my mysql base. </p>
  
  <p>I make getEvents.php file, which is connecting with base and taking data of events. When I printing result from this file then all is ok and i see my events, but when I trying to include this result to DataSource in calendar script then I dont see any events.</p>
  
  <p>Someone could send some examples how to do it?</p>
  
  <p>My codes:</p>
  
  <p>getEvents.php</p>
  
  <pre><code>&lt;?php 
  
          require "bdd.php";
          $result = $bdd-&gt;prepare("SELECT `id`, `title`, `start`, `end`, `color`, `dsc`, `zlec`, `stanowisko` FROM `events`");
          $result-&gt;execute();
          $event_array = array();
          $result-&gt;setFetchMode(PDO::FETCH_ASSOC);
          while ($record = $result-&gt;fetch()) {
              $event_array[] = array(
                  'id' =&gt; $record['event_id'],
                  'title' =&gt; $record['event_name'],
                  'start' =&gt; $record['start_event'],
                  'end' =&gt; $record['end_event'],
              );
          }
      echo json_encode($event_array);
  
  ?&gt;
  </code></pre>
  
  <p>calendar script I change to </p>
  
  <pre><code>dataSource: ['getEvents.php']
  </code></pre>
  
  <h2>ACTUALIZATION</h2>
  
  <p>@JeffHuijsmans Im not sure how to fix it.</p>
  
  <p>Please tell me how to fetch into dataSource function result from my getEvents.php file ?</p>
  
  <p>echo from getEvents file return </p>
  
  <pre><code>[{"event_id":"1","event_title":"XXX","event_start":"2017-10-04","event_end":"2017-10-06"}]
  </code></pre>
  
  <p>Default data in dataSource is looking like this:</p>
  
  <pre><code>dataSource: [
              {
                  id: 0,
                  name: 'Google I/O',
                  location: 'San Francisco, CA',
                  startDate: new Date(currentYear, 4, 28),
                  endDate: new Date(currentYear, 4, 29)
              }]
  </code></pre>