title: jquery full calendar : Different color randomly for each event from MySQL
body: <p>I am starting to use jQuery <a href="http://fullcalendar.io/" rel="nofollow">full calendar</a> and creating the event in MySQL database. I would like the calendar events to have different colour randomly. How can I do this?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>&lt;?php if ($event[$j]['allday'] == 0){?&gt;
      { title: '[&lt;?php echo $event[$j]['courseid'];?&gt; by &lt;?php echo $event[$j]['tutorid'];?&gt;]',
      start: new Date(start_year[&lt;?php echo $j?&gt;],
                      start_month[&lt;?php echo $j?&gt;]-1,
                      start_day[&lt;?php echo $j?&gt;],
                      start_hour[&lt;?php echo $j?&gt;],
                      start_mins[&lt;?php echo $j?&gt;]),
      end: new Date(end_year[&lt;?php echo $j?&gt;],
                    end_month[&lt;?php echo $j?&gt;]-1,
                    end_day[&lt;?php echo $j?&gt;],
                    end_hour[&lt;?php echo $j?&gt;],
                    end_mins[&lt;?php echo $j?&gt;]),
      url: 'mg_course.php?courseid=&lt;?php echo $event[$j]['courseid']; ?&gt;'
      },                  
  &lt;?php };
  if ($event[$j]['allday'] == 1) {?&gt;
      { title: '[&lt;?php echo $event[$j]['courseid'];?&gt; by &lt;?php echo $event[$j]['tutorid'];?&gt;]',
      start: new Date(start_year[&lt;?php echo $j?&gt;],
                      start_month[&lt;?php echo $j?&gt;]-1,
                      start_day[&lt;?php echo $j?&gt;],
                      start_hour[&lt;?php echo $j?&gt;],
                      start_mins[&lt;?php echo $j?&gt;]),
      end: new Date(end_year[&lt;?php echo $j?&gt;],
                    end_month[&lt;?php echo $j?&gt;]-1,
                    end_day[&lt;?php echo $j?&gt;],
                    end_hour[&lt;?php echo $j?&gt;],
                    end_mins[&lt;?php echo $j?&gt;]),
      url: 'mg_course.php?courseid=&lt;?php echo $event[$j]['courseid']; ?&gt;',
      allDay: 'false'
  },      
  &lt;?php } ?&gt;
  </code></pre>