Geronantimo
Technical User
I am successfully using "fgetcsv" to parse data from a flat file database into a webpage.
As I do not really have much knowledge of PHP, I am wondering whether the output can be formatted using CSS.
The database has only two fields and I would like the first field to have different formatting to the second.
If it is even possible to format the output, can somebody point me to a resource where I can learn a little more about this?
.
As I do not really have much knowledge of PHP, I am wondering whether the output can be formatted using CSS.
The database has only two fields and I would like the first field to have different formatting to the second.
Code:
<?php
$row = 1;
$handle = fopen("database.csv", "r");
while (($data = fgetcsv($handle, 1000, "|")) !== FALSE) {
$num = count($data);
$row++;
for ($c=0; $c < $num; $c++) {
echo $data[$c] . "<br />\n";
}
}
fclose($handle);
?>
If it is even possible to format the output, can somebody point me to a resource where I can learn a little more about this?
.