- array_map: documentation ( source)
- print_r: documentation ( source)
- array_filter: documentation ( source)
- preg_split: documentation ( source)
<?php
$string = '
background-image: url(../images/....png);
height: 32px;
width: 32px;
margin: 0px;
-webkit-transition: all ease 0.4s;
-moz-transition: all ease 0.4s;
-o-transition: all ease 0.4s;
-ms-transition: all ease 0.4s;
transition: all ease 0.4s;
opacity:0.70;
filter:alpha(opacity=70); /* For IE8 and earlier */
overflow: hidden;
';
$x = preg_split('#[:;]#', $string, -1, PREG_SPLIT_NO_EMPTY);
$x = array_filter(array_map('trim', $x));
print_r($x);