4 Replies - 928 Views - Last Post: 26 March 2012 - 01:01 PM Rate Topic: -----

#1 ttime1  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 26-March 12

Parse error: syntax error, unexpected T_STRING, expecting ')'

Posted 26 March 2012 - 11:01 AM

I'm getting the following error

Parse error: syntax error, unexpected T_STRING, expecting ')' in /home/torrence/public_html/member.php on line 158

which is 'on_change_page' => 'return !loadDynamicBlock({id}, 'member.php?'.$sBlockName.'Mode='.$sMode.'&page={page}&per_page={per_page}');',


related to the following code:

if ($iPages > 1) {
$oPaginate = new BxDolPaginate(array(
'page_url' => BX_DOL_URL_ROOT . 'member.php',
'count' => $iCount,
'per_page' => $iLimit,
'page' => $iPage,
'per_page_changer' => true,
'page_reloader' => true,
'on_change_page' => 'return !loadDynamicBlock({id}, 'member.php?'.$sBlockName.'Mode='.$sMode.'&page={page}&per_page={per_page}');',
'on_change_per_page' => ''
));
$sPaginate = $oPaginate->getSimplePaginate(BX_DOL_URL_ROOT . 'browse.php');
}    
} else {
$sCode = MsgBox(_t("_Empty"));
}
return array($sCode, $aDBTopMenu, $sPaginate);
}

=========

Any assistance would be greatly appreciated.

This post has been edited by CTphpnwb: 26 March 2012 - 11:24 AM
Reason for edit:: Please use code tags!!!


Is This A Good Question/Topic? 0
  • +

Replies To: Parse error: syntax error, unexpected T_STRING, expecting ')'

#2 CTphpnwb  Icon User is online

  • D.I.C Lover
  • member icon

Reputation: 2895
  • View blog
  • Posts: 10,028
  • Joined: 08-August 08

Re: Parse error: syntax error, unexpected T_STRING, expecting ')'

Posted 26 March 2012 - 11:33 AM

This line appears to have extra quotes in it:
'on_change_page' => 'return !loadDynamicBlock({id}, 'member.php?'.$sBlockName.'Mode='.$sMode.'&page={page}&per_page={per_page}');'

Maybe this way?
'on_change_page' => 'return !loadDynamicBlock({id}, member.php?'.$sBlockName.'Mode='.$sMode.'&page={page}&per_page={per_page});'

Was This Post Helpful? 0
  • +
  • -

#3 ttime1  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 26-March 12

Re: Parse error: syntax error, unexpected T_STRING, expecting ')'

Posted 26 March 2012 - 12:13 PM

View PostCTphpnwb, on 26 March 2012 - 11:33 AM, said:

This line appears to have extra quotes in it:
'on_change_page' => 'return !loadDynamicBlock({id}, 'member.php?'.$sBlockName.'Mode='.$sMode.'&page={page}&per_page={per_page}');'

Maybe this way?
'on_change_page' => 'return !loadDynamicBlock({id}, member.php?'.$sBlockName.'Mode='.$sMode.'&page={page}&per_page={per_page});'



Thanks for your input. When I placed your suggestion I now get the following error which related to the line just below the replacement code:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/torrence/public_html/member.php on line 159
Was This Post Helpful? 0
  • +
  • -

#4 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6039
  • View blog
  • Posts: 23,436
  • Joined: 23-August 08

Re: Parse error: syntax error, unexpected T_STRING, expecting ')'

Posted 26 March 2012 - 12:42 PM

So add a comma after that line; you're still populating an array.
Was This Post Helpful? 0
  • +
  • -

#5 ttime1  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 26-March 12

Re: Parse error: syntax error, unexpected T_STRING, expecting ')'

Posted 26 March 2012 - 01:01 PM

View PostJackOfAllTrades, on 26 March 2012 - 12:42 PM, said:

So add a comma after that line; you're still populating an array.


Thanks to the both of you...That did it!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1