New to PHP and very confused...

mattura

Member
Messages
570
Reaction score
2
Points
18
Yep agree with table/thead/tr/td etc, makes it much clearer.
BUT, some browsers do strange things if you line-wrap <td> tags:
Code:
<td>
Content
</td>
MAY not be the same as:
Code:
<td>Content</td>
so watch out!
 

Salvatos

Member
Prime Account
Messages
562
Reaction score
1
Points
18
Are you kidding me? Damned browsers!
What kind of behavior can it cause? And do you know on which browsers?

Edit: I can't really avoid line-wrap anyway when I have hundreds of lines of code inside one...
 
Last edited:

mattura

Member
Messages
570
Reaction score
2
Points
18
It can cause gaps/whitespace. I'm not sure of the exact browsers, but I believe netscape navigator and some versions of IE. Anyone fancy testing this?

You don't need to avoid line wrap altogether, just next to the <td> tags. And with php you can put any amount of white space anywhere:
PHP:
echo "<td>";
echo "content";
echo "</td>";
and
HTML:
<td><?php
echo "content";
?></td>

both still give: <td>content</td>
 

Salvatos

Member
Prime Account
Messages
562
Reaction score
1
Points
18
Okay, I see your point.
I just don't understand why Netscape is still around though...
 

bpakidz

New Member
Messages
36
Reaction score
0
Points
0
EXCELLENT! Thanks so much for the examples. I'll try out the suggestions next week...

-K
 
Top