Documentation

NavNext

mixed
CDBResult::NavNext(
 bool SetGlobalVars = true,
 string prefix = "str_",
 bool DoEncode = true,
 bool SkipEntities=true
 )

Returns an array of field values. If the init_globals flag is checked, the method declares global variables with prefix.field_names. If the end of retrieved selection is reached, the method returns "false". Non-static method.

Notes:
  • The method operates with variables from global scope; it should be taken into account when creating main component files.
  • When NavNext features are not required directly, using CDBResult::GetNext is recommended instead.

Parameters

ParameterDescription Available from version
SetGlobalVars If "true", the method will add global variables named after selection field names.
Optional. By default - "true".
prefix Prefix of global variables (only if init_globals is specified).
Optional. By default - "str_".
DoEncode Concert global variables into HTML safe format (only if init_globals is set).
Optional. By default - "true".
SkipEntities Optional. by default - "true".

See also

Examples of use

<?
$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");
?>


© «Bitrix24», 2001-2022
Up