Putting PHP echos inside of a table

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Zorth
Forum Commoner
Posts: 76
Joined: Fri Feb 20, 2004 8:00 pm

Putting PHP echos inside of a table

Post by Zorth »

I had some part of my website that I needed inside of a table to space out. However, when I placed the table flags around the PHP and took a look, it put newlines all over the place, even in the MIDDLE of echos where it would make no sense at all for them to be.

Is there some kind of "bad mixture" between PHP echos and HTML tables?
Goowe
Forum Commoner
Posts: 94
Joined: Mon Mar 15, 2004 9:51 am
Location: Southeast Alaska

Post by Goowe »

Can you show the code where the table begins and ends? And also the part where you're echoing inside the table? Thanks :wink:
User avatar
tim
DevNet Resident
Posts: 1165
Joined: Thu Feb 12, 2004 7:19 pm
Location: ohio

Post by tim »

there is a /bad mixture/ if you will between the two.

for example.

<font face="green" size="12">

if this was within a php body ( the <? and ?> ) it would for sure give an error. to escape it, some people go about it like this
<font face=\"green\" size=\"12\">
or
<font face=green size=12> the " " messes up if not escaped by /'s.

hope this explains it for you, if not, like goowe said, post the code :twisted:
Post Reply