fork download
  1. <?php
  2.  
  3. $data = "10/01/2016";
  4. function beforeSaveData($data){
  5. $data = explode("/", $data);
  6. $novaData = $data[2] . "-" . $data[1] . "-" . $data[0];
  7. return $novaData;
  8. }
  9. $novaData = beforeSaveData($data);
  10. echo $novaData;
  11. // your code goes here
Success #stdin #stdout 0.02s 52472KB
stdin
Standard input is empty
stdout
2016-01-10