private static function sortData($text)
    {
        if (preg_match('/[-,\\n]/', $text)) {
            $broken = preg_split('/[-,\\n]/', $text);
            for ($i = 0; $i < strlen($broken[0]); $i++) {
                if (is_numeric(substr($broken[0], $i, 1))) {
                    return array(
                        substr($broken[0], 0, $i),
                        substr($broken[0], $i),
                        $broken[1]
                    );
                }
            }
        }
        $text = preg_replace('/\s/', ' ', $text);
        $find = substr($text, -strlen($text));
        for ($i  =0; $i < strlen($text); $i++) {
            if (is_numeric(substr($find, $i, 1))) {
                return array(
                    substr($text, 0, -strlen($text)+$i),
                    substr($text, -strlen($text)+$i),
                    ''
                );
            }
        }
        return array($text, '', '');
    }
private static function sortData($text)
    {
        if (preg_match('/[-,\\n]/', $text)) {
            $broken = preg_split('/[-,\\n]/', $text);
            for ($i = 0; $i < strlen($broken[0]); $i++) {
                if (is_numeric(substr($broken[0], $i, 1))) {
                    return array(
                        substr($broken[0], 0, $i),
                        substr($broken[0], $i),
                        $broken[1]
                    );
                }
            }
        }
        $text = preg_replace('/\s/', ' ', $text);
        $find = substr($text, -strlen($text));
        for ($i  =0; $i < strlen($text); $i++) {
            if (is_numeric(substr($find, $i, 1))) {
                return array(
                    substr($text, 0, -strlen($text)+$i),
                    substr($text, -strlen($text)+$i),
                    ''
                );
            }
        }
        return array($text, '', '');
    }
private static function sortData ( $ text ) { if ( preg_match ( '/[-,\\n]/' , $ text ) ) { $ broken = preg_split ( '/[-,\\n]/' , $ text ) ; for ( $ i = 0 ; $ i < strlen ( $ broken [ 0 ] ) ; $ i ++ ) { if ( is_numeric ( substr ( $ broken [ 0 ] , $ i , 1 ) ) ) { return array ( substr ( $ broken [ 0 ] , 0 , $ i ) , substr ( $ broken [ 0 ] , $ i ) , $ broken [ 1 ] ) ; } } } $ text = preg_replace ( '/\s/' , ' ' , $ text ) ; $ find = substr ( $ text , - strlen ( $ text ) ) ; for ( $ i = 0 ; $ i < strlen ( $ text ) ; $ i ++ ) { if ( is_numeric ( substr ( $ find , $ i , 1 ) ) ) { return array ( substr ( $ text , 0 , - strlen ( $ text ) + $ i ) , substr ( $ text , - strlen ( $ text ) + $ i ) , '' ) ; } } return array ( $ text , '' , '' ) ; }
Sort the data reported
@param string $text - Text to be ordained
@return array - Returns an array with the sorted data
Sort the data reported