fork download
  1. <?php
  2.  
  3. $variavel = "-4.08768, -63.141322 23/04/2017 22:00:00";
  4. $variavel=str_replace(", ",",",$variavel);
  5. $partes = explode(' ',$variavel);
  6.  
  7. $coordenadas=$partes[0];
  8. $data=$partes[1];
  9. $hora=$partes[2];
  10. $coordenadas=str_replace(",", ",",$coordenadas);
  11. echo $coordenadas ."\n";
  12. echo $data ."\n";
  13. echo $hora ."\n";
Success #stdin #stdout 0.02s 82880KB
stdin
Standard input is empty
stdout
-4.08768,-63.141322
23/04/2017
22:00:00