php - sprintf new line not working -


i trying format array of string data using sprintf reason can't print new line. want new line started after line_1 returned. here code have. appreciated. new using sprintf may doing wrong.

function format_address($address_array) { return sprintf( "%s \n %s %s %s \t %s",     $address_array['line_1'],     $address_array['city'],     $address_array['state'],     $address_array['zip'],     $address_array['line_5']     ); } 

just formalize answer question may marked "solved" based on liam's suggestion:

function format_address($address_array) {     return sprintf( "%s <br/> %s %s %s \t %s",         $address_array['line_1'],         $address_array['city'],         $address_array['state'],         $address_array['zip'],         $address_array['line_5']     ); } 

Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -