Error fetching array by index

0

I have this code and I do not know why it is returning only the first character of the variable (exe: if the login contains the Diego value, it only prints D) The print_r that is there, I put to test the return all the information I need is there in the array.

I apologize if it was not the most elaborate question.

<table border="1">
            <tr>
                <td>idSessao</td>
                <td>Modelo</td>
            </tr>
            <?php
                $idSessao = $_SESSION['login']['uid'];
                $modelObj->get_dados_venda_club($idSessao);
                $lista = $modelObj->data;

                print_r($lista);
                if(!isset($lista)){
                    foreach ($lista as $key => $listas) {
                ?>

                    <tr>
                        <td><?php echo $listas['idSessao']?></td>
                        <td><?php echo $listas['modelo']?></td>
                    </tr>

                <?php       
                     }
                }else{
                    echo "não existe retorno ".$listas;
                }
            ?>
        </table>

// return with var_dump

array (7) {["id"] = > string (2) "13" ["template"] = > string (4) "1564" ["login"] = > string (28) "I have an idea of what goes in here" [= "password"] = > string (8) "88274574" ["cadin"] = > string (10) "1459800190" ["status"] = > string (1) "1" ["idSession"] = > string (1) "1"}

    
asked by anonymous 05.04.2016 / 21:43

0 answers