在PHP中的DIV中添加日期
我刚开始学习PHP,我一直在做一些应该很容易解决的事情 在这个脚本中,我想添加一个echo/print?适用于脚本其余部分所需日期部分的日期 有人能告诉我如何在“DATE NEEDED”周围添加一个div,并让它显示站点上的实际日期吗在PHP中的DIV中添加日期,php,html,date,Php,Html,Date,我刚开始学习PHP,我一直在做一些应该很容易解决的事情 在这个脚本中,我想添加一个echo/print?适用于脚本其余部分所需日期部分的日期 有人能告诉我如何在“DATE NEEDED”周围添加一个div,并让它显示站点上的实际日期吗 if ( get_option('vh_time_format') == false || get_option('vh_time_format') == '24h' ) { $output .= '<li><div class="ti
if ( get_option('vh_time_format') == false || get_option('vh_time_format') == '24h' )
{
$output .= '<li><div class="time icon-clock">' . $needed_info[0]
. '</div> DATE NEEDED <div class="ticket hover_right"><a href="'
. $new_button_link . '" class="icon-ticket">' . $new_button_text
. '</a></div><div class="event_auditory">' . __('Venue:', 'vh')
. $value['theatre'] . ', ' . $needed_info[1] . '</div></li>';
}
else { (almost the same) }
if(get_选项('vh_时间_格式')==false | | get_选项('vh_时间_格式')==24h)
{
$output.='。$needed\u信息[0]
“需要日期”。(地点:,“vh”)
.$value['theatre'].,'.$required_-info[1]. ';
}
否则{(几乎相同)}
带日期功能:
$output .= '<li><div class="time icon-clock">'.$needed_info[0].'</div> <div>'.date("Y-m-d H:i:s").'</div> <div class="ticket hover_right"><a href="'.$new_button_link.'" class="icon-ticket">'.$new_button_text.'</a></div><div class="event_auditory">' . __('Venue:', 'vh') . $value['theatre'].', '.$needed_info[1].'</div></li>';
div start, date, and div end ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
$output.=''.$needed_info[0].'.日期(“Y-m-d H:i:s”)'__(“地点:”,“vh”)$价值['theatre'],'.$needed_info[1]. ';
div开始、日期和div结束^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
无需等待。。它是今天的日期,但不是函数中其他地方使用的日期;如果(($value['date']=$post_-date&&$show_-all!='1')|($value['date']>=$post_-date&&$show_-all='1')){等等。如何获取上面使用的日期?只需在$output
之前创建一个变量,并根据您的条件设置它,然后在您想要的地方回显它。