I have such an inline CSS like this
color:#777;font-size:16px;font-weight:bold;left:214px;position:relative;top:70px
The CSS may
Here's a quick-and-dirty script that does what you're asking:
0) {
$kv = explode(":", trim($attr));
$parsed[trim($kv[0])] = trim($kv[1]);
}
}
?>
And the output of print_r($parsed)
is:
Array
(
[color] => #777
[font-size] => 16px
[font-weight] => bold
[left] => 214px
[position] => relative
[top] => 70px
)