RE: [PHP] Formatting text
| From: | Maciek Ruckgaber Bielecki | Date: | Sun, 29 Dec 2002 18:39:50 +0000 |
| Subject: | RE: [PHP] Formatting text | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-129595@lists.php.net to get a copy of this message | ||
have alook at this one, i have one prob, dont know how your 'Results'
field does look like so i used ' '(or space) separator
hope it helps :-)
<?php
if ($result=mysql_query($sql))
{
$numofrows=mysql_num_rows($result);
Print "Greengrass database has found the following result that matches
your search";
print " <br>\n";
print " <br>\n";
}
$content = "<table>";
while($row=mysql_fetch_array($result))
{
$content .= "<tr><td><b>Identity :
</b>".$row['GGID']."</td></tr>\n"
.= "<tr><td><b>Organisation name :</b>
".$row['OrgName']."</td></tr>\n"
.= "<tr><td><b>Organisation country :
</b>".$row['OrgCountry']." </td></tr>\n"
.= "<tr><td><b>Organisation Address :
</b>".$row['OrgAddress']."</td></tr>\n";
$content
.="<tr><td><table><tr><td><b>Results:</b></td>";
// sorry, dont know which separator you can use exactly, i lost your
previous code
$results = explode(' ',$row['Results']);
foreach($results as $value)
{
$content .="<td>$value</td>";
}
$content .="</tr></table></td></tr></table><br
/>";
}
?>
------------------------------------------------------------------
"Few are those who see with their own eyes and feel with their own
hearts."
Albert Einstein
-----------------------------------------------------------------
Maciek Ruckaber Bielecki