0
Accurate in PHP
format the value 1.174.36
in 1174.36
I need to remove all previous points from the penny.
I’m racking my brain here but I can’t find the solution.
all the solutions I can find is the reverse of what I’m needing example if it’s 100.100.000.10 I need it to stay at 100100000.10
If you can help me, I’d be grateful
all previous points of the penny need to remove
– Fernando
if someone has the same problem: $valor_pedido_expode = explodes('.', $valor_requested); $valor_pedido_expode2 = explode('.', $valor_requested); end($valor_pedido_expode); key($valor_pedido_expode); $valor_pedido_final = '; foreach ($valor_pedido_expode2 as $key => $valor_de_cada) { if($key == key($valor_pedido_expode)){ $valor_pedido_final .= '. '. $valor_de_cada; }Else{ $valor__pedido_final .= $valor_de_cada; } }
– Fernando