
echo "<td colspan=3>{$Row['areaCode'] . '-' . $Row['prefix'] . '-' . $Row['lineNumber']}</td></tr>";
I know that the concatenation operator is the .
'areaCode' 'prefix' and 'lineNumber' are all fields in a table within an SQL database.
any help would be appreciated.
Thanks in advance. Patricia 

Just in case someone else comes across this kind of problem in the future.
The code I finally figured out is
echo "<td colspan=3>({$Row['areaCode']}) {$Row['prefix']}-{$Row['lineNumber']}</td></tr>";
It will print out the phone number as follows:
(000) 000-0000
Works perfectly. Now to finish the rest of the project.
Thanks, Patricia
Hi.
Parse error: parse error, expecting `’}” in C:\wamp\www\OswaltPatricia_Unit7Assignment\OswaltP_Connect.php on line 48
is the error message. Sorry, don’t know why I didn’t put that in. It also dawned on me that when I created the fields, each of the three fields had max values. areaCode has a max value of 3, same with prefix and the lineNumber has a max value of 4.
I’m not sure if that would make a difference or not when I’m simply trying to display the contents in a table.
Thanks, Patricia


Patricia, what is the error message ?
Hi.
Parse error: parse error, expecting `’}” in C:wampwwwOswaltPatricia_Unit7AssignmentOswaltP_Connect.php on line 48
is the error message. Sorry, don’t know why I didn’t put that in. It also dawned on me that when I created the fields, each of the three fields had max values. areaCode has a max value of 3, same with prefix and the lineNumber has a max value of 4.
I’m not sure if that would make a difference or not when I’m simply trying to display the contents in a table.
Thanks, Patricia
This is cleaner
echo '<td colspan=3>(' . $Row['areaCode'] . ') ' . $Row['prefix'] . '-' . $Row['lineNumber'] . '</td></tr>';or