Skip to content Skip to sidebar Skip to footer

How To Concatenate Html Stylized Table With Php And Sql

So, i have this code that returns me a simple table with the correct db values: Código

Solution 1:

To provide a full solution:

<tableclass="table table-striped projects"><thead><tr><thstyle="width: 1%">#</th><thstyle="width: 20%">Nome</th><th>Membros Recentes</th><th>Project Progress</th><th>Status</th><thstyle="width: 20%">#Edit</th></tr></thead><?phpwhile($coluna_bd_tabela = mysqli_fetch_array($sql_indicador_resul)){ ?><tbody><tr><td><?phpecho$coluna_bd_tabela['usu_codigo']; ?></td><td><a><?phpecho$coluna_bd_tabela['usu_nome']; ?></a><br /><small><?phpecho$coluna_bd_tabela['usu_indicou']; ?></small></td><td><ulclass="list-inline"><li><imgsrc="images/user.png"class="avatar"alt="Avatar"></li><li><imgsrc="images/user.png"class="avatar"alt="Avatar"></li><li><imgsrc="images/user.png"class="avatar"alt="Avatar"></li><li><imgsrc="images/user.png"class="avatar"alt="Avatar"></li></ul></td><tdclass="project_progress"><divclass="progress progress_sm"><divclass="progress-bar bg-green"role="progressbar"data-transitiongoal="57"></div></div><small>57% Complete</small></td><td><buttontype="button"class="btn btn-success btn-xs">Success</button></td><td><ahref="#"class="btn btn-primary btn-xs"><iclass="fa fa-folder"></i> View </a><ahref="#"class="btn btn-info btn-xs"><iclass="fa fa-pencil"></i> Edit </a><ahref="#"class="btn btn-danger btn-xs"><iclass="fa fa-trash-o"></i> Delete </a></td></tr></tbody><?php } ?></table>

You forgot to use the <?php and ?> opening and closing tags around the echo statements. Furthermore, you missed the ; at the end of each statement. I've also moved the beginning and the end of the table out of PHP's echo since I believe it looks much clearer this way.

Post a Comment for "How To Concatenate Html Stylized Table With Php And Sql"