Bitrix Site Manager

CDBResult::NavNext

mixed
CDBResult::NavNext(
 bool init_globals = true,
 string prefix = "str_",
 bool safe_for_html = true
)

Returns an array of field values. If the parameter init_globals is set, the method defines global variables with names like prefix.field_name.

Note
The method operates variables of the global scope; take this fact into consideration when creating files of components.

Parameters

ParameterDescription
init_globals If true, the method will define global variables named after names of the fields. Optional; true by default.
prefix Prefix used to create names of the global variables (if init_globals is set). Optional; "str_" by default.
safe_for_html Tells to convert global variables to the HTML safe format (if init_globals is set). Optional; true by default.

Return Values

Returns false if there is no more records, or the array of field values otherwise.

See Also

Example



<?
$rsBanners = CAdvBanner::GetList($by, $order, $arFilter, $is_filtered);
$rsBanners->NavStart(20);
echo $rsBanners->NavPrint("Banners");
while($rsBanners->NavNext(true, "f_")):
    echo "[".$f_ID."] ".$f_NAME."<br>";
endwhile;
echo $rsBanners->NavPrint("Banners");
?>