I output it like this:
echo $info[0].'        ';
echo $info[1].'        ';
echo $info[2].'        ';
but instead of   I want to start my next output at column 30 or whatever, using   doesn't align it and it looks ugly..
How to align my data???
Moderator: General Moderators
-
slipstream
- Forum Commoner
- Posts: 86
- Joined: Fri Apr 19, 2002 8:53 am
- Location: Canada
why u dont try to use the tags html ??
is put in the center or what ever u need to put
Code: Select all
<div align="center"></div>is put in the center or what ever u need to put
-
slipstream
- Forum Commoner
- Posts: 86
- Joined: Fri Apr 19, 2002 8:53 am
- Location: Canada
but
all the data is on the same line, I want to have the output like this
info1 info2 info3 info4
nice and even, I can't use a div there, won't work for each piece of data
info1 info2 info3 info4
nice and even, I can't use a div there, won't work for each piece of data
-
slipstream
- Forum Commoner
- Posts: 86
- Joined: Fri Apr 19, 2002 8:53 am
- Location: Canada
but
I did this:
foreach($file as $line)
{
$info = explode('|', $line);
echo " <tr>\n";
echo " <td>" . $info[0] . "</td>";
echo " <td>" . $info[1] . "</td>";
echo " <td>" . $info[2] . "</td>";
echo " <td>" . $info[3] . "</td>";
echo " </tr>\n";
$totHours += $info[2];
}
and it works but the data on each line is too close together, I'd like about 10 spaces between each piece of data, any ideas?
foreach($file as $line)
{
$info = explode('|', $line);
echo " <tr>\n";
echo " <td>" . $info[0] . "</td>";
echo " <td>" . $info[1] . "</td>";
echo " <td>" . $info[2] . "</td>";
echo " <td>" . $info[3] . "</td>";
echo " </tr>\n";
$totHours += $info[2];
}
and it works but the data on each line is too close together, I'd like about 10 spaces between each piece of data, any ideas?
Code: Select all
echo "<table name=t1 cellpadding=3 cellspacing=3>";
foreach($file as $line)
{
$info = explode('|', $line);
echo " <tr>\n";
echo " <td>" . $infoї0] . "</td>";
echo " <td>" . $infoї1] . "</td>";
echo " <td>" . $infoї2] . "</td>";
echo " <td>" . $infoї3] . "</td>";
echo " </tr>\n";
$totHours += $infoї2];
}-
slipstream
- Forum Commoner
- Posts: 86
- Joined: Fri Apr 19, 2002 8:53 am
- Location: Canada
Perfect,
thanks 