Hi.
I am using php to process the information on my booking form. The users enter their address into the form as follows:
Address______________
Zip ________
... creating the following variables:
[$address1]
[$address2]
[$address3]
[$zip]
... which are then printed on the 'results' page like this:
$address = $address1 . ", " . $address2 . ", " . $address3 . ", " . $zip;
e.g.:
"No. 3 The Street, The Town, The State, The Zip"
BUT...
If the user does not enter, for example, a value for address 3, I am left with a space, eg:
"No. 3 The Street, The Town, , The Zip"
How can I close up the gap - i.e. when one of the 4 variables is empty I want to delete it from the list which makes up the '$address' variable.
Thanks for your help.