Shamsh Sameed Ahsan Shamsh Sameed Ahsan - 4 months ago 9
SQL Question

Display Only Month From Mysql Database

This code displays date as: 13-07-2016
I want to display only month and year. Example: "July 2016"
How do I modify this code so that it gets Only month and year and displays it.
Code:

<td><?=$this->wll->getDateFormate(6,$row['bill_date'])?></td>

Answer
$date = $row['bill_date'];
$month = date('F', strtotime($date));
$year = date('Y', strtotime($date));

<td><?php echo $month . ' ' . $year; ?></td>