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
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
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
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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.