Bitrix Site Manager

CRubric::GetSubscriptionCount

CRubric::GetSubscriptionCount(
    $ID
);

The method GetSubscriptionCount returns the number of subscribers of the specified mailing list. Both confirmed and unconfirmed subscribers are counted.

Parameters

ParameterDescription
$IDThe mailing list ID.

Return Values

The method returns an integer which is the number of subscribers.

Example



<?
//get site's newsletter categories
$rub = CRubric::GetList(array("SORT"=>"ASC", "NAME"=>"ASC"), 
                        array("ACTIVE"=>"Y", "LID"=>LANG));
while($rub->ExtractFields("r_")):
?>
    <input 
     type="checkbox" 
     name="sf_RUB_ID[]" value="<?echo $r_ID?>">
    <?echo $r_NAME?> (<?echo CRubric::GetSubscriptionCount($r_ID);?>)<br>
<?
endwhile;
?>