wordpress - How to replace "$" sign from any string with something else in PHP? -
i working wordpress project. using money related work. amount in database.the amount shows $ sign. want replace $ sign euro sign. when using str_replace function took $amount variable, not string. way replace $ ?
here echo product_list_price($project->id); function returning price containing $ sign. have replace sign euro sign , echo. how can convert single quoted string?
thanks in advance
$europrice = str_replace('$', '€', $dollarprice);
as mentioned here, php tries interpret words starting $ inside double-quoted strings variables.
Comments
Post a Comment