Okay, so this is the tag i want to modify in my snippet:
<body style="; width: 100%;" class="portrait" data-promo-button="">
I don't want to change it's innerHTML, but it's style attribute. I want to add the following to the style attribute:
background-color:black;
it's the only body tag in the whole snippet. I use simpleHTMLDom to get the content, where the body tag is included:
function game_login($link)
{
global $options;
$ch=curl_init($link);
curl_setopt_array($ch, $options);
$content=curl_exec($ch);
echo $content;
}
The body tag i want to edit, is stored in the $content
variable
Thanks in advance
$string =' <body style="; width: 100%;" class="portrait" data-promo-button=""> </body>';
$html = str_get_html($string);
$html->find('body', 0)->style .= 'background-color:black;';
echo $html;