src/PHPHtmlParser/Dom/Tag.php
public function setStyleAttributeValue($attr_key, $attr_value): void
    {

        $style_array = $this->getStyleAttributeArray();
        $style_array[$attr_key] = $attr_value;

        $style_string = '';
        foreach ($style_array as $key => $value) {
            $style_string .= $key . ':' . $value . ';';
        }

        $this->setAttribute('style', $style_string);
    }
public function setStyleAttributeValue($attr_key, $attr_value): void
    {

        $style_array = $this->getStyleAttributeArray();
        $style_array[$attr_key] = $attr_value;

        $style_string = '';
        foreach ($style_array as $key => $value) {
            $style_string .= $key . ':' . $value . ';';
        }

        $this->setAttribute('style', $style_string);
    }
public function setStyleAttributeValue ( $ attr_key , $ attr_value ) : void { $ style_array = $ this -> getStyleAttributeArray ( ) ; $ style_array [ $ attr_key ] = $ attr_value ; $ style_string = '' ; foreach ( $ style_array as $ key => $ value ) { $ style_string .= $ key . ':' . $ value . ';' ; } $ this -> setAttribute ( 'style' , $ style_string ) ; }
Set inline style attribute value.

@param mixed $attr_key
@param mixed $attr_value
Set inline style attribute value .