mixed CDBResult::ExtractFields( string prefix="str_", bool encode=true )
The method ExtractFields
defines global variables with names in the format ${prefix."field
name"}. Values of the variables are set to those of the corresponding
fields,. Variables can be optionally converted to the HTML
safe format.
| Parameter | Description |
|---|---|
| prefix | Prefix for the global variables. Optional; str_ by default. |
| encode | Specifies to convert the global variables to the HTML safe format. Optional; the default value is true. |
Returns an array like Array("field"=>"value" [, ...]) and moves the pointer to the next record. If no more records are available, the method returns false.
<select>
<?
$rs = CGroup::GetList($order="ID", $by="ASC");
while ($rs->ExtractFields("g_")) :
?><option value="<?=$g_ID?>"
<?if (IntVal($g_ID)==IntVal($show_perms_for)) echo " selected";?>
><?=$g_NAME?></option><?
endwhile;
?>
</select>
| © 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |