delucaspinto

DATA E VALOR CONVERTIDO

Feb 22nd, 2019
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.31 KB | None | 0 0
  1. //converter valor para float
  2. $valor_float = str_replace(',', '.', str_replace('.','', str_replace('R$ ','', $valor_pagamento)));
  3.        
  4. //converter data brasil para datetime
  5. $date = date('Y-m-d', strtotime(str_replace('/','-', $_POST['get_option3'])));
  6.  
  7. // number format
  8. $res = number_format($calc, 2, ',', ' ');
Advertisement
Add Comment
Please, Sign In to add comment