Home  >  Article  >  Backend Development  >  Parse error: syntax error, unexpected '[' in C:AppServwwwgenerate_order.ph,该怎么处理

Parse error: syntax error, unexpected '[' in C:AppServwwwgenerate_order.ph,该怎么处理

WBOY
WBOYOriginal
2016-06-13 12:18:321299browse

Parse error: syntax error, unexpected '[' in C:\AppServ\www\generate_order.ph
这个问题出在哪里??

if (! $dsql->ExecuteNoneQuery ( $inQuery )) {<br />	ShowMsg ( 'Database error!', '-1' );<br />	exit ();<br />}<br /><br />$mid = $dsql->GetOne ( "SELECT * FROM `#@__im_order` WHERE email = '$email' ORDER BY order_id desc" )["order_id"];<br />$OrdId = $mid;


------解决思路----------------------
你的 php 版本低于 5.4

改为
$mid = $dsql->GetOne ( "SELECT * FROM `#@__im_order` WHERE email = '$email' ORDER BY order_id desc" );
$OrdId = $mid["order_id"];

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn