Код: Выделить всё
preg_replace('/\S+plati.ru\S+idd=([0-9]+)/', 'http://'. Yii::app()->params['site_url'].'/p/$1', $string));
Код: Выделить всё
preg_replace('/\S+plati.ru\S+idd=([0-9]+)/', CHtml::link(), $string));
Код: Выделить всё
preg_replace('/\S+plati.ru\S+idd=([0-9]+)/', 'http://'. Yii::app()->params['site_url'].'/p/$1', $string));
Код: Выделить всё
preg_replace('/\S+plati.ru\S+idd=([0-9]+)/', CHtml::link(), $string));
Код: Выделить всё
preg_replace_callback('/\S+plati.ru\S+idd=([0-9]+)/', function($matches) {
print_r($matches);
return "http://myurl" . $matches[1];
}, $string);