I am current working on a site http://www.groupthink.com.au/public/
and on the left hand side is a bunch of links under the Top Blue Chips. However, since the start of each company is pushed over 5 spaces by using
If the string is too long it goes to the next line but does not go right underneath the beggining of the start of the string. I do not know how to get it aligned.
My code is:
...
$stocks = mysql_query("select * from companies where class_id = 1 ORDER BY class_id ASC, company_code ASC");
while ($stock = mysql_fetch_object($stocks)) {
echo "
<tr>
<td background=\"/public/images/sign-bg.gif\" valign=\"top\"><font size=\"1\"> <a href=\"/public/index.php#" . $stock->company_code . "\">" . $stock->company_name . "</a></font></td>
</tr> <tr>
<td background=\"/public/images/sign-bg.gif\" valign=\"top\"><font size=\"1\"><img src=\"/public/images/btn-bg.gif\" width=\"153\" height=\"5\"></font></td>
</tr>
";
}
...
I tried adding in the while loop
$stock->company_name = str_replace("\n", " ", $stock->company_name);
$stock->company_name = str_replace("\r", " ", $stock->company_name);
$stock->company_name = str_replace("\n\r", " ", $stock->company_name);
$stock->company_name = str_replace("\r\n", " ", $stock->company_name);
But that does not seem to help. Any suggestions?