helpers\BaseArrayHelper htmlEncode()

htmlEncode() public static method

Encodes special characters in an array of strings into HTML entities.

Only array values will be encoded by default. If a value is an array, this method will also encode it recursively. Only string values will be encoded.

See also http://www.php.net/manual/en/function.htmlspecialchars.php.

public static array htmlEncode ( $data, $valuesOnly = true, $charset = null )
$data array

Data to be encoded

$valuesOnly boolean

Whether to encode array values only. If false, both the array keys and array values will be encoded.

$charset string

The charset that the data is using. If not set, yii\base\Application::$charset will be used.

return array

The encoded data

doc_Yii
2016-10-30 17:04:26
Comments
Leave a Comment

Please login to continue.