I want to edit string like below example :
$str = '$variable$123'
Convert to
$str = '$variable$*123'
I tried below code :
<?php
$str = '$variable$123';
$str= preg_replace('/(\$\w*\$.[0-9]*)+/i', '$1*$2', $str);
echo $str;
?>
But didn't get as i want...
Please help.....