Insert a multi-line address

2 posts by 2 authors in: Forums > CMS Builder
Last Post: July 8, 2016   (RSS)

By Daryl - July 8, 2016

Hi Perch,

Could it be because $_SESSION['strAddress2'] has a "whitespace" value?
You can quickly check it using:

print $_SESSION['strAddress2'] ? "has a value" : "no value";

Or try this:

$colsToValues['address']  = $_SESSION['strAddress1']."\r\n";
$colsToValues['address'] .= @$_SESSION['strAddress2'] ? $_SESSION['strAddress2'] . "\r\n" : '';
$colsToValues['address'] .= $_SESSION['strCity'];

Thanks,

Daryl Maximo
PHP Programmer - interactivetools.com