AddEventHandler("sale", "OnBeforeBasketAdd", "OnBeforeBasketAddHandler");
function OnBeforeBasketAddHandler(&$arFields)
{
$arFields['LID']=SITE_ID;
}
$string = 'id=171:znac=1;id=203.204:znac=1;id=225:znac=1;id=162.1:znac=0.5;id=203:znac=31;';
preg_match_all('/id=(\d+\.?!|\d+.\d+)/', $string, $matches);
var_dump($matches[1]);
$string = 'id=171:znac=1;id=203:znac=1;id=225:znac=1;id=162:znac=0.5;id=203:znac=31;';
$id = 225;
preg_match_all('/id=('.$id.')/', $string, $matches);
var_dump($matches);