Let say i have identification card number in this format
720901155172
we can convert the number to birthday by using this code
$data = '720901155172';
$head = substr($data, 0, 6);
$year = (int) substr($head, 0, 2);
$currentYear = date('Y');
$max = (int) substr($currentYear, 2, 4);
$byear = $year + ($year > $max ? 1900 : 2000);
$bmth = (int) substr($head, 2, 2);
$bday = (int) substr($head, 4, 2);
$bdate = date('Y-m-d', strtotime(sprintf('%s-%s-%s', $byear, $bmth, $bday)));
echo $bdate;//output : 1972-09-01
how do i select all user that is having birthday today ? is this possible ?
$sql="SELECT ic FROM users";