How can I display the results of mysql_fetch_assoc in a dynamic table?
Aren't you forgetting something, called &lt;td&gt;?

Try

&lt;?php

// Configure connection settings

$db = 'scorecard';
$db_admin = 'root';
$db_password = '********';
$tablename = 'scoreboard';

// Title

//echo "&lt;b&gt;DIV!&lt;/b&gt;";

// Connect to DB

$sql = mysql_connect("localhost", $db_admin, $db_password)
or die(mysql_error());

mysql_select_db("$db", $sql);

// Fetch the data

$query = "SELECT * FROM $tablename";
$result = mysql_query($query);
echo mysql_error();

echo "&lt;table width='100%'&gt;\n";

// Return the results, loop through them and echo

while($row = mysql_fetch_assoc($result))
{
    echo '&lt;tr&gt;'."\n";
    echo "&lt;td&gt;{$row['codcliente']}&lt;/td&gt;\n" . "&lt;td&gt;{$row['nombre']}&lt;/td&gt;\n" . "&lt;td&gt;{$row['ejecutivo']}&lt;/td&gt;\n" . "&lt;td&gt;{$row['banca_as400']}&lt;/td&gt;\n" . "&lt;td&gt;{$row['banca_real']}&lt;/td&gt;\n" . "&lt;td&gt;{$row['ingresos']}&lt;/td&gt;\n" . "&lt;td&gt;{$row['ciiu']}&lt;/td&gt;\n" . "&lt;td&gt;{$row['division']}&lt;/td&gt;\n" . "&lt;td&gt;{$row['actividad']}&lt;/td&gt;\n" . "&lt;td&gt;{$row['riesgo_industria']}&lt;/td&gt;\n" . "&lt;td&gt;{$row['riesgo_cliente']}&lt;/td&gt;\n" . "&lt;td&gt;{$row['fecha']}&lt;/td&gt;\n" . "&lt;td&gt;{$row['analista']}&lt;/td&gt;\n";

    echo '&lt;/tr&gt;'."\n";
}

echo "&lt;/table&gt;\n";

?&gt;