Forum Moderators: coopster
The script is as followed
//////////////////////////////////////////////////////
function GetPriceLevel($thisPid, $thisCid){
$searchItems[] = new searchItem(FIELD_PRICE_LEVEL_PID,$thisPid);
$searchItems[] = new searchItem(FIELD_PRICE_LEVEL_CID,$thisCid);
$thisPrice_levelManager = new Price_levelManager();
$thisPrice_levelResultsInfo = $thisPrice_levelManager->searchPrice_level($searchItems);
$thisPrice_levelInfoArray = $thisPrice_levelResultsInfo->getResultsArray();
if (count($thisPrice_levelInfoArray)==0){
$thisReturn = "NO PRICE LEVEL FOUND";
}
else if(count($thisPrice_levelInfoArray)==1){
for ($a=0;$a<count($thisPrice_levelInfoArray);$a++){
$thisPrice_levelInfo = $thisPrice_levelInfoArray[$a];
$thisReturn['price'] = $thisPrice_levelInfo->getPrice();
$thisReturn['date'] = $thisPrice_levelInfo->getDate();
$thisReturn['id'] = $thisPrice_levelInfo->getId();
$thisReturn['remarks'] = $thisPrice_levelInfo->getRemark();
}
}
else{
$thisReturn = "MORE THAN ONE PRICE LEVEL";
}
return $thisReturn;
}
///////////////////////////////////////////////////
there is a error near $thisReturn['price']
The error is :
Parse error: parse error, unexpected T_STRING, expecting ']' in d:\barsh28\projects\external\xyz.com\workshop\include\module.core.inc.php on line 1294
The script is function in a class. But when I am testing the function without putting it inside the class, it is giving no error.
Please Help!.