私のPHPファイルでは、日付は次の形式になっています: "2012-10-09 00:00:00"; 「10月9日」または「10月9日」(年を除く)として表示する必要があります。
どうすればこれを達成できますか?
これを試して:
echo date("M, d", strtotime($from));
<?php
$from= "2012-10-09 00:00:00"
echo date('F n Y, strtotime($from)); // n-day, F- full month name, Y-Year
?>
Please check this link for reference: http://php.net/manual/en/function.date.php You can skip 'Y' above to remove year from output.