On Tue, Jun 04, 2002 at 04:40:26AM +0400, Ricardo Fitzgerald wrote:
>
> I'm trying to echo a neat table
I've GOT to bust your chops. That table and your code are anything BUT
neat. For neat, you need to put </td> tags to close each cell. Also
nest your code properly...
if ($value2 ==0) {
echo "<td>$variable1";
}
as opposed to
if ($value2 ==0) {
echo "<td>$variable1";
}
Now, to the logic problems in your code. Please note, I've snipped a
LOT...
> //Value1 is always 1
> if ($value1 == 0)
> {
> exit
> }
So, if the value "is always 1" why bother even doing the test?
> if ($value2 ==0)
> {
> ."<td ... >$variable1 ...
> }
> if($value2 == 0)
> {
> ."<td ... >$variable1 ...
> ."<tr> /next row
> ."<td ... >$variable5 ...
> }
Dude, you're evaluating if $value2 == 0 twice and thus printing the same
stuff twice.
> if($value3 == 3)
> {
> ."<td ... >$variable1 ...
> ."<tr> /next row
> ."<td ... >$variable5 ...
> ."</tr>
> ."<td ... >$variable9 ...
Now, if $value3 == 3 you're going ahead and printing out variable1 and 5
all over again. Am I correct in assuming that if value3 == 3 all you
want to print is variable9 and up? If so, then just print that.
--Dan
--
PHP classes that make web design easier
SQL Solution | Layout Solution | Form Solution
sqlsolution.info | layoutsolution.info | formsolution.info
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
4015 7 Av #4AJ, Brooklyn NY v: 718-854-0335 f: 718-854-0409
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php