ho provato a fare una cosa del genere:
teoricamente dovrebbe andare ma in pratica l'eregi_replace non cambia nulla (e i $matches sono corretti) Perchè? :master:
codice:
$change = '';
preg_match_all("/\[".$tag."\]([^\[]+)\[\/".$tag."\]/", $stringa, $matches);
for ($i=0; $i< count($matches[0]); $i++) {
$change = str_replace ( '<', '<', $matches[1][$i]);
$change = str_replace ( '>', '>', $change);
$stringa = eregi_replace($matches[0][$i], $change, $stringa);
#echo $matches[0][$i].'
'.$matches[1][$i].'
';
#echo $matches[0][$i].'
'.$change.'
';
}