getting months using mktime not working in PHP 7.0.
$month_options=\"\";
for( $i = 1; $i <= 12; $i++ ) {
$month_num = str_pad( $i, 2, 0, STR_P
note PHP7 = is_dst parameter has been removed.
$month_options="";
for( $i = 1; $i <= 12; $i++ ) {
/* $month_num = str_pad( $i, 2, 0, STR_PAD_LEFT ); -- there is no use for this line */
$month_name = date( 'F', mktime( 0, 0, 0, $i + 1, 0, 0)); // is_dst parameter has been removed.
/* $selected=""; -- there is no use for this line */
/* $month_options.$month_name."
"; -- you are not correctly set this paramter */
$month_options .= $month_name."
"; // so if you do like this, it will be correct
}
echo $month_options;