function random_my($content)
{
while(strpos($content, "{") !== false)
{
$content = preg_replace_callback(
'/{([^{}]+)}/',
create_function('$m',
'$r = $m[1];
if (strpos($r, "|") === false) return $r;
$v = explode("|", $r);
return $v[array_rand($v)];'
),
$content
);
}
return $content;
}