. Весь шаблон.
preg_match('|
|Uis', $stat, $matches);
// получаем массив строк
preg_match_all('||s', $matches[0], $matches);
$arr_td = array();
$arr_tr = array();
foreach ($matches[0] as $value) {
preg_match_all('|(.*?)|s', $value, $matches);
foreach ($matches[0] as $v) {
$arr_td[] = strip_tags($v);
}
if (!empty($arr_td)) {
$arr_tr[] = $arr_td;
}
$arr_td = array();
}
function cmp($a, $b) {
if ($a['10'] == $b['10']) {
return 0;
}
return ($a['10'] < $b['10']) ? -1 : 1;
}
$data_tmp = array();
for ($i = 0; $i < 1000; $i++) {
$data_tmp = $arr_tr;
uasort($data_tmp, 'cmp');
}
?>
0 |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
';
echo '' . $value[0] . ' | ';
echo '' . $value[1] . ' | ';
echo '' . $value[2] . ' | ';
echo '' . $value[3] . ' | ';
echo '' . $value[4] . ' | ';
echo '' . $value[5] . ' | ';
echo '' . $value[6] . ' | ';
echo '' . $value[7] . ' | ';
echo '' . $value[8] . ' | ';
echo '' . $value[9] . ' | ';
echo '' . $value[10] . ' | ';
echo '' . $value[11] . ' | ';
echo '' . $value[12] . ' | ';
echo '/';
}
?>