fork download
  1. <?php
  2. $amount = '$1,500.00';
  3. echo preg_replace('~{amount_val}~', str_replace('$', '\$', $amount), '{amount_val}');
  4. ?>
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
$1,500.00