<?php $str = "1 2 3"; $newStr = preg_replace_callback("/\d+/", function($matches){ return $matches[0] * 2; }, $str); echo $newStr;
You have javascript disabled. You will not be able to edit any code.