I want to add an IF inside the events in full calendar, like, if date is not null use date, else, use dow. Something like this, but this gives me white screen.
events: [<?php
while($row_events = mysqli_fetch_array($resultado_events)){
?>
{
title: '<?php echo $row_events['title'];?>',
if(<?php echo $row_events['date']; ?> != '')
{
start: '<?=$row_events['date'].' '.$row_events['start'];?>',
end: '<?=$row_events['date'].' '.$row_events['end'];?>',
}
else {
start: '<?php echo $row_events['start']; ?>',
end: '<?php echo $row_events['end']; ?>',
dow: [ <?php echo $row_events['dow']; ?> ],
}
},<?php
}
?>],
So basically, it is supposed to work like this. If it has a date, it will use the date and only show on that day, if date in database is null, use the dow and recurre the event.