helpers\BaseHtml cssStyleToArray()

cssStyleToArray() public static method

Converts a CSS style string into an array representation.

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

For example,

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

The CSS style string

return array

The array representation of the CSS style

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

Please login to continue.