-1
I have the following value:
R$ 1,524.33
I need to write to the database in the format: 1524.33
How can I do that?
-1
I have the following value:
R$ 1,524.33
I need to write to the database in the format: 1524.33
How can I do that?
1
Use the function str_replace
:
<?
$valor_sem_ponto = str_replace(',', '.', str_replace('.', '', "1.524,33"));
echo $valor_sem_ponto;
?>
Upshot
1524.33
Browser other questions tagged php
You are not signed in. Login or sign up in order to post.