Simple questions for a beginner
Posted: Wed Sep 05, 2007 3:58 pm
OK - I'm not a programmer. I am trying to learn some things on my own.
My first question has to do with formatting PHP output.
Here is a snippet
This code works fine. The variables are being pulled from a database, no problem.
The above code also works fine, showing the contents of the row as bold. So far so good.
I would expect this code to color the background of the column, it doesn't.
My error is
My next question has to do with using variables to define formatting, in other words I want my background color to change (red, blue) depending on a value (1,0) in a database.
Go easy on me please.
Thanks!
My first question has to do with formatting PHP output.
Here is a snippet
Code: Select all
{
echo "<tr> <td>$TopLevel</td>
<td>$category</td>
<td>$offeringsname</td>
<td>$resnames</td></tr>";
}Code: Select all
{
echo "<tr> <td><b>$TopLevel</b></td>
<td>$category</td>
<td>$offeringsname</td>
<td>$resnames</td></tr>";
}Code: Select all
{
echo "<tr> <td bgcolor="#00CCFF">$TopLevel</td>
<td>$category</td>
<td>$offeringsname</td>
<td>$resnames</td></tr>";
}My error is
So, what am I doing wrong? AND more importantly, anyone had a good reference to documentation that explains formatting table output?Parse error: syntax error, unexpected '>' in C:\www\output_all2.php on line 51
My next question has to do with using variables to define formatting, in other words I want my background color to change (red, blue) depending on a value (1,0) in a database.
Go easy on me please.
Thanks!