I have a array which i generated by values in a database, the example is below:
$addressarray = array($results[\'client\']->client_city, $results[\'client
I think you can use array_filter to your array before use implode() function
implode()
$address = implode("\n", array_filter($addressarray));