解析错误:语法错误,意想不到的T_DOUBLE_ARROW PHP [英] Parse error: syntax error, unexpected T_DOUBLE_ARROW PHP

查看:1020
本文介绍了解析错误:语法错误,意想不到的T_DOUBLE_ARROW PHP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到一个

 解析错误:语法错误,日行47意外T_DOUBLE_ARROW PHP,这是
            POST_CONTENT'=> $ thisShow ['内容'],

任何人有什么想法,为什么?

 保护功能_saveShow(thisShow $){
    $ SAVEDATA =阵列(
        MID=> $这个 - > _saveAsUserId,
        POST_TITLE'=> $ thisShow ['标题'],
        POST_NAME'=>蛞蝓($ thisShow ['标题'],
        POST_CONTENT'=> $ thisShow ['内容'],
        POST_DATE'=>日期('Y-M-D H:I:S'),
        post_date_gmt'=>日期('Y-M-D H:I:S'),
        CATEGORY_ID'=> 4,
        post_author'=> 0,
        CATEGORY_NAME'=> $ thisShow ['CATEGORY_NAME']
    );   // $这个 - > _database->插入('wp_posts',$ SAVEDATA);}


解决方案

在没有关闭就行之前的括号:

 'POST_NAME'=>蛞蝓($ thisShow ['标题'])

I'm getting a

Parse error: syntax error, unexpected T_DOUBLE_ARROW PHP on line 47, which is 
            'post_content' => $thisShow['content'],

Anyone got any ideas why?

protected function _saveShow($thisShow) {       
    $saveData = array(
        'mid' => $this->_saveAsUserId, 
        'post_title' => $thisShow['title'],
        'post_name' => slug($thisShow['title'],
        'post_content' => $thisShow['content'],
        'post_date' => date('Y-m-d H:i:s'),
        'post_date_gmt' => date('Y-m-d H:i:s'),
        'category_id' => 4,
        'post_author' => 0,
        'category_name' => $thisShow['category_name']       
    );

   // $this->_database->insert('wp_posts', $saveData);

}

解决方案

you didn't close your parenthesis on the prior line:

   'post_name' => slug($thisShow['title']),

这篇关于解析错误:语法错误,意想不到的T_DOUBLE_ARROW PHP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆