Search code examples
mysqlfullcalendarapostrophe

slight problem with fullcalendar when event has an apostrophe -- it disappears


I am using fullcalendar with a mysql recordset and php. It works really well, but if an event has an apostrophe, the calendar does not appear.

Is there a quick and easy way to escape the apostrophe or strip it from the string automatically ?


Solution

  • Escape your apostrophe's with the backslash character '\':

    $blah = 'nicklamort\'s answer';