$variavel = "-4.08768, -63.141322 23/04/2017 22:00:00";
First we take the space after the comma and then make an explode with space so as not to separate the latitude of the longitude
$variavel=str_replace(", ",",",$variavel);
O explode
$partes = explode(' ',$variavel);
$coordenadas=$partes[0];
$data=$partes[1];
$hora=$partes[2];
And finally we put the space after the comma in the variable $ coordinates
$coordenadas=str_replace(",", ",",$coordenadas);
The output will be
echo $coordenadas; //-4.08768, -63.141322
echo $data; //23/04/2017
echo $hora; //22:00:00
Putting it all together:
$variavel = "-4.08768, -63.141322 23/04/2017 22:00:00";
$variavel=str_replace(", ",",",$variavel);
$partes = explode(' ',$variavel);
$coordenadas=$partes[0];
$data=$partes[1];
$hora=$partes[2];
$coordenadas=str_replace(",", ",",$coordenadas);
echo $coordenadas;
echo $data;
echo $hora;
example- ideone
The same result is obtained as follows:
$variavel = "-4.08768, -63.141322 23/04/2017 22:00:00";
$partes = explode(' ',$variavel);
$latitude=$partes[0]; //-4.08768,
$longitude=$partes[1]; //-63.141322
$data=$partes[2]; //23/04/2017
$hora=$partes[3]; // 22:00:00
$latLong=$latitude." ".$longitude; // -4.08768, -63.141322
example - ideone