Jump to content

php echo td width


nathanblogs

Recommended Posts

sorry I do have them in the code, however I forgot to add them. Heres some more code with the HTML wraps.

 

echo "<html><head></head><body><table BORDER>";
echo "<tr>";
echo "<td WIDTH=500><b>Company Name:</b> " . $d->Record['company_name'] . "</td>";
echo "</tr>";
echo "</table></body></html>";

Link to comment
https://forums.phpfreaks.com/topic/77892-php-echo-td-width/#findComment-394284
Share on other sites

n~ link=topic=168254.msg741856#msg741856 date=1195451939]

It is working for me in FF, change this line and check, I have added bg color=black 

echo "<td width=500 bgcolor=000000><b>Company Name:</b> " . $d->Record['company_name'] . "</td>";

 

I just tried in both FF and IE and its not working:/. however HEIGHT works fine

Link to comment
https://forums.phpfreaks.com/topic/77892-php-echo-td-width/#findComment-394290
Share on other sites

Your output would be

Company Name:The value
for this code

 

echo "<td WIDTH=500><b>Company Name:</b>" . $d->Record['company_name'] . "</td>";

 

Try this

echo "<td WIDTH=500><b>Company Name:</b></td><td>" . $d->Record['company_name'] . "</td>";

Link to comment
https://forums.phpfreaks.com/topic/77892-php-echo-td-width/#findComment-394296
Share on other sites

n~ link=topic=168254.msg741864#msg741864 date=1195452712]

Strange , try this and remove the php variable for now

<?php
echo "<html><head></head><body><table BORDER>";
echo "<tr>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "</tr>";
echo "</table></body></html>";
?>

 

 

sorry this does work, even through I'm sure I tried it and it didn't work :(, however I have about 50 fields like so

 

<?php
echo "<html><head></head><body><table BORDER>";
echo "<tr>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "<td width=500 height=250 bgcolor=000000><b>Company Name:</b></td>";
echo "</tr>";
echo "</table></body></html>";
?>

 

and the only thing thats working is the height :/

Link to comment
https://forums.phpfreaks.com/topic/77892-php-echo-td-width/#findComment-394298
Share on other sites

sorry this does work, even through I'm sure I tried it and it didn't work Sad, however I have about 50 fields like so

Actually what are you trying to display ? If you keep your <tr><td></td></tr> inside a loop then you don't have to display 50 fields or so....

 

I don't know why the width is not working for you, I think you may have applied some CSS.

 

Link to comment
https://forums.phpfreaks.com/topic/77892-php-echo-td-width/#findComment-394301
Share on other sites

n~ link=topic=168254.msg741870#msg741870 date=1195453719]

sorry this does work, even through I'm sure I tried it and it didn't work Sad, however I have about 50 fields like so

Actually what are you trying to display ? If you keep your <tr><td></td></tr> inside a loop then you don't have to display 50 fields or so....

 

I don't know why the width is not working for you, I think you may have applied some CSS.

 

 

its a stand alone script that will just display all the details of a company from a database. theres no css connected to it.

Link to comment
https://forums.phpfreaks.com/topic/77892-php-echo-td-width/#findComment-394303
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.