Sorry the subject's a little confusing, and I hope I explain this correctly.
I have a textfield which takes CSV data which then is split into arrays using explode(). My problem is that I need the labels at the top and the width needs to match the max width of each column data. Currently alll the data is displayed perfectly in tabled columns, but I need the titles at the top ie>
DATE TIME TYPE USERNAME TYPE FULLNAME etcc..
Here is what i have for my code:
<?php if(isset($_POST['feild1'])){
$stripped = str_replace("\r", ",", $_POST['feild1']);
$BREAK = explode(",", $stripped);
echo "<TR nowrap>";
$count=count($BREAK);
for ($i = 0; $i < $count; $i++) {
//if the count is greater than 28, then start a new table row
if (($i)%29==0)
{
echo "</TR><TR nowrap>";
echo "<TD><FONT SIZE=2>".$BREAK[$i]."</FONT></TD>";
}
else {
if (($i+1)%29==0)
{
echo "<TD><FONT SIZE=2>".$BREAK[$i]."</FONT></TD>";
}
else {
echo "<TD><FONT SIZE=2> ".$BREAK[$i]."</FONT></TD>";
};
};
};
}
?>
</tr>
Any help is appreciated.
Thanks,
dR
I have a textfield which takes CSV data which then is split into arrays using explode(). My problem is that I need the labels at the top and the width needs to match the max width of each column data. Currently alll the data is displayed perfectly in tabled columns, but I need the titles at the top ie>
DATE TIME TYPE USERNAME TYPE FULLNAME etcc..
Here is what i have for my code:
<?php if(isset($_POST['feild1'])){
$stripped = str_replace("\r", ",", $_POST['feild1']);
$BREAK = explode(",", $stripped);
echo "<TR nowrap>";
$count=count($BREAK);
for ($i = 0; $i < $count; $i++) {
//if the count is greater than 28, then start a new table row
if (($i)%29==0)
{
echo "</TR><TR nowrap>";
echo "<TD><FONT SIZE=2>".$BREAK[$i]."</FONT></TD>";
}
else {
if (($i+1)%29==0)
{
echo "<TD><FONT SIZE=2>".$BREAK[$i]."</FONT></TD>";
}
else {
echo "<TD><FONT SIZE=2> ".$BREAK[$i]."</FONT></TD>";
};
};
};
}
?>
</tr>
Any help is appreciated.
Thanks,
dR