helpers\BaseHtml cssStyleFromArray()

cssStyleFromArray() public static method

Converts a CSS style array into a string representation.

For example,

print_r(Html::cssStyleFromArray(['width' => '100px', 'height' => '200px']));
// will display: 'width: 100px; height: 200px;'
public static string cssStyleFromArray ( array $style )
$style array

The CSS style array. The array keys are the CSS property names, and the array values are the corresponding CSS property values.

return string

The CSS style string. If the CSS style is empty, a null will be returned.

doc_Yii
2016-10-30 17:05:02
Comments
Leave a Comment

Please login to continue.