PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php $string = 'This is my habr'; $pattern = '/(\w+ \w+)$/i'; $replacement = '<a href="habr.com">${1}<a>'; echo preg_replace($pattern, $replacement, $string);
Show:  
Copy Clear