How to display an array horizontally?

1

I'm not able to print an array horizontally on an HTML page. How can I do this?

PHP:

if (isset($_GET['nome']) && $_GET!=['nome']) {
    $lista_tarefa = array();
    $lista_tarefa['nome'] = $_GET['nome'];
}



if (isset($_GET['descricao'])) {
    $lista_tarefa['descricao'] = $_GET['descricao'];
} else {
    $lista_tarefa['descricao'] = '';
}

PHP + HTML:

  <table>

  <?php foreach ($lista_tarefa as $tarefa) : ?>

       <tr>
           <td> <?php echo $tarefa; ?> </td>
        </tr>

   <?php endforeach; ?>

 </table>
    
asked by anonymous 26.04.2015 / 04:20

1 answer

3

Leave only the "td" inside the loop.

    
26.04.2015 / 05:09