Documentation

GetFilterParams

string
GetFilterParams(
 mixed var,
 bool DoHtmlEncode = true,
 array button = array("filter"=>"Y","set_filter"=>"Y")
);

The function returns the string containing the URL parameters from an array of variables or variables which names begin with the specified prefix.

Function parameters

ParameterDescription Available from version
var Names of variables. Either an array of variables names, or a string with prefix of the required variables can be passed in this parameter.
DoHtmlEncode If the value equals to "true", the result will be converted to the HTML safe format.
button The array containing name and value of arbitrary variables added to the result can be passed in this parameter. This array has the structure as follows:
array("VARIABLE_NAME" => "VARIABLE_VALUE")
Usually this parameter is used to pass a name and value of "Set filter" button.
Optional parameter. By default - array ("filter" => "Y", "set_filter" => "Y").

See Also

Examples of use

<?
// This code builds a link allowing to 
// open the page adv.php with the variables
// used to open the current page
// whose names have prefix "filter_"
?>
<a href="adv.php?id=<?echo $f_ID?>&<?echo GetFilterParams("filter_");?>">Modify</a>


© «Bitrix24», 2001-2024
Up