Advertisement
zero50x

Использовние preg_replace_callback

May 5th, 2016
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.24 KB | None | 0 0
  1. preg_replace_callback(
  2.     '~[А-ЯЁA-Z]{2,}~u',
  3.     function ($match) {
  4.         return mb_strtolower($match[0], 'utf-8');
  5.     },
  6.     'Товар "Диван Амстердам" МИКС, акция, ОГРАНИЧЕННАЯ ПАРТИЯ'
  7. );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement