StirolXXX
Постоялец
- Регистрация
- 11 Июн 2006
- Сообщения
- 80
- Реакции
- 38
while (preg_match('#\[([a-z]+)\s*?(?:[^\]]*?)\](.*?)(\[/\1\])#is', $message, $m))
{
$message = str_replace($m[0], $m[2], $message);
}
Замени на:
while(preg_match_all('#\[(\w+?)(?>[^\]]*?)\](.*)(\[/\1\])#siU', $message, $regs))
{
foreach($regs[0] AS $key => $val)
{
$message = str_replace($val, $regs[2]["$key"], $message);
}
}
{
$message = str_replace($m[0], $m[2], $message);
}
Замени на:
while(preg_match_all('#\[(\w+?)(?>[^\]]*?)\](.*)(\[/\1\])#siU', $message, $regs))
{
foreach($regs[0] AS $key => $val)
{
$message = str_replace($val, $regs[2]["$key"], $message);
}
}