Hi,
i have some code
foreach ($category_list as $category => $sub_category)
{
switch($category)
{
case "DVD";
$aw_id = "240";
$aw_name = "DVDs";
$keywords = "-region 1";
break;
case "CD";
$aw_id = "241";
$aw_name = "Music";
$keywords = "";
break;
case "Video Games";
$aw_id = "579";
$aw_name = "Video Games";
$keywords = "";
break;
case "Blu-Ray";
$aw_id = "550";
$aw_name = "Blu-Ray";
$keywords = "-region 1";
break;
case "Books";
$aw_id = "538";
$aw_name = "Books";
$keywords = "";
break;
}
print "<div class='category_container'>";
print "<h2 class='category_header red'>$category</h2>";
print $keywords;
#GET TOP 5 ITEMS FOR EACH CATEGORY
$AW_catid = $aw_id;
$AW_cat = $aw_name;
$keywords = "";
$oRefineBy = new stdClass();
$oRefineBy -> iId = 4;
$oRefineBy -> sName = 'Category';
$oRefineByDefinition = new stdClass();
$oRefineByDefinition -> sId = $AW_catid;
$oRefineByDefinition -> sName = $AW_cat;
$oRefineBy -> oRefineByDefinition = $oRefineByDefinition;
$returnedcolumns = array(sName,sAwImageUrl,sMerchantImageUrl,sMerchantThumbUrl,sDescription,sBrand,iMerchantId,iCategoryId);
$booleansearch = array("sQuery" => "$keywords", "oActiveRefineByGroup" => $oRefineBy, "bAdult" => true, "iLimit"=>5, "sColumnToReturn" => $returnedcolumns, "bIncludeTree" => true, "sSort"=>"popularity", "sMode" => "boolean");
when defining the keywords "sQuery" => "$keywords" it returns different results from putting the keywords in the query instead of the varible name like so
$booleansearch = array("sQuery" => "-region 1", "oActiveRefineByGroup" => $oRefineBy, "bAdult" => true, "iLimit"=>5, "sColumnToReturn" => $returnedcolumns, "bIncludeTree" => true, "sSort"=>"popularity", "sMode" => "boolean");
ive printed out the values of $keyword and they are correct but im not sure why im getting the two sets of results with what looks to be the same query?
also if i remove the quotes around $keywords i get the same results as i did with them?
any ideas?

thanks