解析错误:语法错误意外T_VARIABLE

时间:2017-09-28 22:26:20

标签: php

我对这个错误感到疯狂。这是我的代码:

if ( $result != "Ball In Play" ) {
  // If Pitch Is A Ball
  if ( $result == "Ball" ) {
    $balls += 1;
    // Check If Batter Is Walked
    if ( $balls == 4 ) {
      $this->concludeAtBat( "Walk", "" );
    }
    // Update Balls Count
    update_post_meta( $this->ID, "balls", $balls );
  }

我收到了这个

  

错误:解析错误:语法错误,第261行/Applications/XAMPP/xamppfiles/htdocs/.../file.php中的意外'$ result'(T_VARIABLE)

第261行是:

if ( $result == ball ){

有人可以告诉我我错过了什么吗? 谢谢你的帮助。

0 个答案:

没有答案
相关问题