如何在wordpress中的数组中回显服务器时间


How to echo server time in an array in wordpress

我使用了下面的代码,

<?php
 $this->settings['copyright'] = array(
        'title'   => __( 'Copyright' ),
        'desc'    => __( 'Please enter the copyright text you wish to appear in the footer left.' ),
        'std'     => '©2012-'<?php echo date("Y"); ?> 'here i write some more', //here i am trying to echo it, but i get the error below
        'type'    => 'text',
        'section' => 'general'
    );
?>

我收到如下错误,

Parse error: syntax error, unexpected '?'

试试这个,

'©2012-'<?php echo date("Y"); ?> 'here i write some more',

应该是

'©2012-'.date("Y").'here i write some more',

        <?php
         $this->settings['copyright'] = array(
                'title'   => __( 'Copyright' ),
                'desc'    => __( 'Please enter the copyright text you wish to appear in the footer left.' ),
                'std'     => '©2012-'.date("Y").'here i write some more', //here i am trying to echo it, but i get the error below
                'type'    => 'text',
                'section' => 'general'
            );
        ?>