I am outputting my results to a table and would like to have more than one line of text in a cell. ie the address. Does anyone know what the syntax is I tried:
print '<td>'.$row2['RetailerName'].'</n>';
print .$row2['RetailerAdd1'].'</n>';
print .$row2['RetailerAdd2'].'</n>';
print .$row2['RetailerAdd3'].'</n>';
print .$row2['RetailerTown'].'</n>';
print .$row2['RetailerCounty'].'</n';
print .$row2['PostCode'].'</td>';
but I got a parse error.
should I have something before the .$row2 part like with the '<td>'
any help appreciated
not sure of correct syntax
Moderator: General Moderators
-
nutstretch
- Forum Contributor
- Posts: 104
- Joined: Sun Jan 11, 2004 11:46 am
- Location: Leicester
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
Try this:
The HTML linebreak tag is <br /> as opposed to </n> and you shouldn't have the concenation characters in front of the print statements.
Mac
Code: Select all
<?php
print '<td>'.$row2['RetailerName'].'<br />';
print $row2['RetailerAdd1'].'<br />';
print $row2['RetailerAdd2'].'<br />';
print $row2['RetailerAdd3'].'<br />';
print $row2['RetailerTown'].'<br />';
print $row2['RetailerCounty'].'<br />';
print $row2['PostCode'].'</td>';
?>Mac