Bitrix Site Manager

COption::SetOptionString

bool
COption::SetOptionString(
 string module_id,
 string option_id,
 string value = "",
 mixed description = false
)

The method SetOptionString sets the string value of the parameter option_id for the module_id. Returns true on success, or false otherwise.

Parameters

Parameter Description
module_id Module ID.
option_id Parameter ID.
value Parameter value.
Optional. Empty by default.
description Parameter description.
Optional. False by default which means that the description is absent.

See Also

Example



<?
// set the value of the field
// "Site administrator E-Mail (default sender)" 
// from the Kernel module settings
COption::SetOptionString("main","email_from","admin@site.com");
?>