Question: I want to get the current location in longitude and latitude in Android 8.0+ when the app is running and I don't want to display notification as we have in the background services. 

I was previously using background location services in android below 8.0 but in 8.0 we need to show a notification.

Answer: 
Try this

```
    $phone ='';
    while($row = $get_result->fetch_assoc())
    {

      if($phone && $row['dnr_phone']) {
          $phone .= ',';
        } 
      $phone .=$row['dnr_phone'];
    }
    echo $phone;

```
Due to above code, $phone takes only last mobile number,because sendSMS function called after while loop.

Solution::
sendSMS("Pname",$phone,$message);
This function should be in while loop.