GetRubricArray
array CSubscription::GetRubricArray( int ID );
Method returns array with newsletter IDs for subscribed current address. Static method.
Parameters
Parameter | Description | Available from version |
---|---|---|
ID | Subscription ID. |
Returned value
Array with integers, newsletter IDs.
Example
<? //shows all subscription categories and checks subscribed one $aSubscrRub = CSubscription::GetRubricArray($ID); $rub = CRubric::GetList( array("LID"=>"ASC", "SORT"=>"ASC", "NAME"=>"ASC"), array("ACTIVE"=>"Y", "LID"=>LANG) ); while($rub->ExtractFields("r_")): $bChecked = in_array($r_ID, $aSubscrRub); ?> <input type="checkbox" name="RUB_ID[]" value="<?echo $r_ID?>"<?if($bChecked) echo " checked"?>> <?echo $r_NAME?><br> <? endwhile; ?>
© «Bitrix24», 2001-2024