Forum Moderators: coopster

Message Too Old, No Replies

Proble with a PHP SCRIPT

         

barsh28

12:14 am on Feb 1, 2006 (gmt 0)



I am haveing a problem with a PHP script

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!.

Salsa

5:17 pm on Feb 1, 2006 (gmt 0)

10+ Year Member



Are we looking at code that includes line 1294 of

d:\barsh28\projects\external\xyz.com\workshop\include\module.core.inc.php

?

Look there, and there is apparently a missing ] on that line or above it.