cloudy

Author Topic: text align center and removing line break? [Resolved]  (Read 347 times)

0 Members and 1 Guest are viewing this topic.

Offline Bashy

  • Posts: 1,034
  • Northants, UK
    • Northants Weather
text align center and removing line break? [Resolved]
« on: February 04, 2010, 02:21:59 PM »
Hi folks

I have tried to remove the line breaks from this code (below) but its not working
this is how it looks at the moment

Monday Night there is a 30 percent chance of snow.

Tuesday there is a 20 percent chance of snow.

Tuesday Night there is a 10 percent chance of snow.


and i would like it to look like this but center aligned as well

Monday Night there is a 30 percent chance of snow.
Tuesday there is a 20 percent chance of snow.
Tuesday Night there is a 10 percent chance of snow.


this is the code where its creating the above

Code: [Select]
$numrow = 0;
for ($i=0; $i<count($rsklst); $i++) {
if (strlen($rsklst[$i]) > 2) {
 echo "\n";
 echo '<tr>';
 echo '<td bgcolor="'.$piccell.'" align="center" colspan="1" rowspan="2">';
 echo '<img src="'.$ridir.$rskimg[$i].'.png" width="58" height="58"></td>';
 echo "\n";
 echo '<td bgcolor="'.$ttlcell.'" align="center" width="'.$descrwidth.'"><b><font face="'.$fontface.'" color="'.$tifocolr.'">';
 echo $titles[$i];
 echo "\n";
 echo '</font></b></td></tr>';
 echo "\n";
 echo '<tr><td bgcolor="'.$txtcell.'" width="'.$descrwidth.'"><font face="'.$fontface.'" size="-1" color="'.$tefocolr.'">';
 echo $rsklst[$i];
 echo '</font></td></tr>';
 // echo "\n";
 $numrow++;

Could some one please advise as to what i need to do, i did thin it was just a case
of removing the
Code: [Select]
echo "\n"; but evidently not  :oops:
« Last Edit: February 05, 2010, 12:40:02 PM by Bashy »
Kind regards

Simon

Bashys Hosting


Offline Bashy

  • Posts: 1,034
  • Northants, UK
    • Northants Weather
Re: text align center and removing line break?
« Reply #1 on: February 04, 2010, 05:46:05 PM »
Curly has come to the rescue once again and resolved this for me, thanks again curly....
Kind regards

Simon

Bashys Hosting


 

cumulus