2016-04-06 41 views
-6

我試圖運行這個數組,但每次我得到這個錯誤PHP數組的語法錯誤

Parse error: syntax error, unexpected '=', expecting ')' in C:\wamp\www\soap-service\AnchorSoapClient.php on line 75

這是我的PHP代碼:

public function submitorder(){ 
      $this->init(); 
      $result = $this->soapClient->SubmitOrder(array('SO'=>array('Flag_Rush_Order'=>'','Date_Ship_By'=>0,'Shipping_Charge'=>0), 'SO_Detail'=>array('SalesOrderDetail'=> 
       array('Product_Seq_Id'=>0,'Order_Quantity'=>0,'Ship_Quantity'=>0,'Unit_Price'=>0,'Discount'=>0,'Extension'=>0,'Customer_ID'=>''),'Flag_All_Complete'=>'','Ship_method_Seq_Id'=>0,'Store_Name'=>'','Store_Message'=>'','Store_Street'=>'','Store_City'=>'','Store_State'=>'','Store_Zip'=>'','Store_Country'=>'','Intl_Tax_Number'=>'','Intl_Tax_Description'=>'Intl_Tax_Description','Intl_Tax_Amount'=>0,'Special_Instruction'=>'','Date_Shipped'=>'Date_Shipped')); 
      return $result; 
     } 

,這是行78的代碼:

$result = $this->soapClient->SubmitOrder(array('SO'=>array('Flag_Rush_Order'=>'','Date_Ship_By'=0,'Shipping_Charge'=>0), 'SO_Detail'=> 

對PHP不太好。

+2

' 'Date_Ship_By'= 0,'應該' 'Date_Ship_By'=> 0,' –

+0

所以許多等於(=)給出的地方應該是=> – WebInsight

+1

***專家提示:***不要採取行動,並且不要說你的需求是迫切的。回答問題的人是忙碌的志願者,就像你的一樣。 –

回答

0

檢查'Date_Ship_By'=0,它應該是'Date_Ship_By'=>0, 你已經錯過了 「)」 結尾......

$result = $this->soapClient->SubmitOrder(array('SO'=>array('Flag_Rush_Order'=>'','Date_Ship_By'=>0,'Shipping_Charge'=>0), 
    'SO_Detail'=>array('SalesOrderDetail'=> array('Product_Seq_Id'=>0,'Order_Quantity'=>0,'Ship_Quantity'=>0,     'Unit_Price'=>0,'Discount'=>0,'Extension'=>0,'Customer_ID'=>''), 'Flag_All_Complete'=>'','Ship_method_Seq_Id'=>0,'Store_Name'=>'','Store_Message'=>'', 'Store_Street'=>'','Store_City'=>'','Store_State'=>'','Store_Zip'=>'','Store_Country'=>'', 'Intl_Tax_Number'=>'','Intl_Tax_Description'=>'Intl_Tax_Description','Intl_Tax_Amount'=>0,'Special_Instruction'=>'','Date_Shipped'=>'Date_Shipped'))); 
+0

好吧,已經修復它上網看到你們實際上給出了相同的解決方案。多謝你們。現在錯誤出來了,這次我不再收到第75行C:\ wamp \ www \ soap-service \ AnchorSoapClient.php中的這個錯誤「解析錯誤:語法錯誤,意外'=',期待')' – Chi

+0

這裏是新的錯誤得到「解析錯誤:語法錯誤,意外';'在C:\ wamp \ www \ soap-service \ AnchorSoapClient.php上線75「 – Chi

+0

@ C0dekid.php我已經完成了,仍然無法追蹤錯誤 – Chi