3 if (!defined('_ECRIRE_INC_VERSION')) {
7 function trier_rss($texte) {
8 if (preg_match_all(',<item.*</item>\s*?,Uims', $texte, $matches, PREG_SET_ORDER
)) {
9 $placeholder = '<!--REINSERT-->';
11 foreach ($matches as $match) {
12 if (preg_match(',<dc:date>(.*)</dc:date>,Uims', $match[0], $r)) {
13 $items[strtotime($r[1])] = trim($match[0]);
14 $texte = str_replace($match[0], unique($placeholder), $texte);
18 $texte = str_replace($placeholder, implode("\n\t", $items) . "\n", $texte);