Hey Guys,


The code below makes my datepicker grey out days which have been entered into my database but its gone a little weird! It only greys out certain dates which means the same date can be entered numerous times! Any idea why this code is not displaying all my results in my datepicker?

Thanks

PHP Code:
<?php
$out 
= array(); 
foreach(
$_POST['place'] as $place){ 
    
$out[] = ("'".mysql_real_escape_string($place)."'"); 

$imploded implode(', '$out); 
echo 
$imploded;

$date "SELECT date FROM activities WHERE place IN ($imploded)"

$grey mysql_query($date)or die(mysql_error());
?>
Code:
var disabledDays = [

<?php while ($row = mysql_fetch_array($grey, MYSQL_ASSOC)) {
   echo '' .$row['date']. ','; 
    
}
?>
];

/* create datepicker */
jQuery(document).ready(function() {
	
	function displayVals() {     
		var numdays = $("#num_days").val();
		var date = new Date();
		jQuery('#datepicker').multiDatesPicker({

			dateFormat: "dd/mm/yy",
			pickableRange:numdays,
			adjustRangeToDisabled: true,
			addDisabledDates: disabledDays
			
		});
		
	}   
	$("#num_days").change(displayVals);    
	displayVals();
});