Public feed
#889118
<?php
function parse_string($string) {
$array = array();
while (stristr($string,'{') == true) {
/** Find first { */
$first_pos = strpos($string,'{');
$last_pos = strpos($string,'}');
$element = substr($string,$first_pos,($last_pos - $first_pos)+1);
$array[] = $element;
$string = str_replace($element,'',$string);
}
$rem_elements = explode(' ',$string);
foreach($rem_elements as $value) {
if (!empty($value)) {
$array[] = $value;
}
}
return $array;
}
?>