javascript - How to display content in horizontal? -


i'm using session php. , i'm not getting display horizontally. how do that?

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 $tarefa) : ?>             <tr>                <td> <?php echo $tarefa; ?> </td>             </tr>         <?php endforeach; ?>  </table> 

i guess...

    $a=0;         while($a<=3){         foreach ($lista_tarefas $tarefa):          echo $tarefa[a];         if($a<=3){           ????         }         $a++;      } 

but not work. me?

your display vertical because each $tarefa in different row of table due <tr> tags. if want them display horizontally need have them in same row:

use instead, in same row:

<table>        <tr>            <?php foreach ($lista_tarefa $tarefa) : ?>                <td> <?php echo $tarefa; ?> </td>            <?php endforeach; ?>         </tr> </table> 

Comments

Popular posts from this blog

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -

ubuntu - Selenium Node Not Connecting to Hub, Not Opening Port -