nathanblogs Posted November 19, 2007 Share Posted November 19, 2007 Hey, I am unable to make a tds width any larger using either print of echo in the following code echo "<td WIDTH=500><b>Company Name:</b> " . $d->Record['company_name'] . "</td>"; if I try set the HEIGHT it works fine? anyone know about this ? thanks Quote Link to comment https://forums.phpfreaks.com/topic/77892-php-echo-td-width/ Share on other sites More sharing options...
~n[EO]n~ Posted November 19, 2007 Share Posted November 19, 2007 Have you missed table and tr. <?php echo "<table><tr><td width=\"200\" bgcolor=\"#990000\"><b>Company Name: " . $d->Record['company_name'] . "</b></td></tr></table>"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/77892-php-echo-td-width/#findComment-394272 Share on other sites More sharing options...
nathanblogs Posted November 19, 2007 Author Share Posted November 19, 2007 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>"; Quote Link to comment https://forums.phpfreaks.com/topic/77892-php-echo-td-width/#findComment-394284 Share on other sites More sharing options...
~n[EO]n~ Posted November 19, 2007 Share Posted November 19, 2007 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>"; Quote Link to comment https://forums.phpfreaks.com/topic/77892-php-echo-td-width/#findComment-394287 Share on other sites More sharing options...
wsantos Posted November 19, 2007 Share Posted November 19, 2007 Are you intentionally putting the echo "<td WIDTH=500><b>Company Name:</b> " . $d->Record['company_name'] . "</td>"; in one cell? Quote Link to comment https://forums.phpfreaks.com/topic/77892-php-echo-td-width/#findComment-394288 Share on other sites More sharing options...
nathanblogs Posted November 19, 2007 Author Share Posted November 19, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/77892-php-echo-td-width/#findComment-394290 Share on other sites More sharing options...
nathanblogs Posted November 19, 2007 Author Share Posted November 19, 2007 Are you intentionally putting the echo "<td WIDTH=500><b>Company Name:</b> " . $d->Record['company_name'] . "</td>"; in one cell? sorry, I don't understand what you mean? Quote Link to comment https://forums.phpfreaks.com/topic/77892-php-echo-td-width/#findComment-394293 Share on other sites More sharing options...
~n[EO]n~ Posted November 19, 2007 Share Posted November 19, 2007 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>"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/77892-php-echo-td-width/#findComment-394295 Share on other sites More sharing options...
wsantos Posted November 19, 2007 Share Posted November 19, 2007 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>"; Quote Link to comment https://forums.phpfreaks.com/topic/77892-php-echo-td-width/#findComment-394296 Share on other sites More sharing options...
nathanblogs Posted November 19, 2007 Author Share Posted November 19, 2007 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 :/ Quote Link to comment https://forums.phpfreaks.com/topic/77892-php-echo-td-width/#findComment-394298 Share on other sites More sharing options...
~n[EO]n~ Posted November 19, 2007 Share Posted November 19, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/77892-php-echo-td-width/#findComment-394301 Share on other sites More sharing options...
nathanblogs Posted November 19, 2007 Author Share Posted November 19, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/77892-php-echo-td-width/#findComment-394303 Share on other sites More sharing options...
wsantos Posted November 19, 2007 Share Posted November 19, 2007 Ok since you are only displaying one column for your entire table try this. echo "<html><head></head><body><table width = 500 BORDER>"; Quote Link to comment https://forums.phpfreaks.com/topic/77892-php-echo-td-width/#findComment-394305 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.