php chytiť mesiac od dátumu
$month = date("m",strtotime($mydate));
Získajte aktuálny mesiac php
date('m');
Získajte aktuálny mesiac php
current month
//half name in words
date('M');
//full name in words
date('F');
//number
date('m');
získať mesiac z databázy php
echo 'Day' . date('d', strtotime($row['Date']));
echo 'Month' . date('m', strtotime($row['Date']));
echo 'Year' . date('Y', strtotime($row['Date']));
php získať aktuálny mesiac prvý deň
//get first day of the current month
$start = date("Y-m-1 00:00:00");
//get current date of the month
$end = date("Y-m-d H:i:s");
//query data for the current month so far
$query = $this->db_model->run_query("select column_1, column_2 from table where date_column BETWEEN '".$start."' AND '".$end."'");