I have a suitecrm implementation where I would like to print a numbers in words in an invoice. The number is currency formatted, so it comes with commas (,). While I try to replace the commas with empty string, it doesn't work at all. In fact, in the below lines no characters is getting replaced at all.
//Value here is 10,720.00
$number = "\$" . $variableName . "_total_amount";
$newValueTemp = str_replace(",","",$number);
//Its still 10,720.00 after this
$newValueTemp = str_replace("0","",$number);
//Its still 10,720.00 after this. So basically nothing is getting replace.
Is this something to do with variable's variable?