Jump to content

Make table wider


mr cracker

Recommended Posts

Hello.

 

i have this code:

$tabla="tbl_familias";   //NOMBRE DE LA TABLA A MOSTRAR

$result = mysql_query("select * from $tabla");

echo "<table bgcolor=\"#DBEDE9\" align=center  style=\"border:5px outset green\">";

for ($i = 0; $i < mysql_num_fields($result); $i++)

{

	print "<th>".mysql_field_name($result, $i)."</th>\n";

	}

	while ($registro = mysql_fetch_row($result))

	{

		echo "<tr>";

		foreach($registro  as $clave)

		{

			echo "<td bgcolor=\"white\"style=\"border:2px groove black\" align=\"center\">",$clave,"</td>";

			}

			}

echo "</tr></table>";

 

 

i get this table:

 

table2.gif

 

 

but its too small, and i want to make it bigger / wider.  I've tried using width like  this:

 

echo "<table bgcolor=\"#DBEDE9\" align=center width="600"  style=\"border:5px outset green\">";

 

but i get: Parse error: syntax error, unexpected T_LNUMBER, expecting ',' or ';'

 

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/200478-make-table-wider/
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.