現在の日付と一致させて現在の誕生日を表示しようとしています。Mysqlの日付形式は1990年9月16日だったので、現在の日付から年をトリミングして9月16日にエコーしました。現在の日付が行の日付と等しい場合、エコーする方法を説明します。以下の方法を試してみましたが、エラーでした。
$timezone = new DateTimeZone("Asia/Kolkata" );
$date = new DateTime();
$date->setTimezone($timezone );
$date2= $date->format( 'd M' );
$date4=date('d M', strtotime($date2));
<?php $sel = $db->query("select * from mov_birthday where date('d M', strtotime(dateofb)) == '$date4' order by dateofb");
while($row=mysql_fetch_array($sel)){
echo ($row['name']); } ?>