PHP check in Array from MYSQL
I want to search in a array from mysql if one dates from a columns is the
current date. For exemple i have this dates in array:
2013-09-03,2013-09-04,2013-09-06,2013-09-05,2013-09-07 and the current
date: 2013-09-03 so i try this:
$dates = unserialize($row['dates']);
$currentDate = date("Y-m-d");
$array = array($dates);
if (in_array($currentDate, $array)) {
echo "IS HERE !";
}
but with out luck.
No comments:
Post a Comment