Error in function to list user data

0

I'm having the following error while listing a user's data with the lista() function.

  

Parse error: syntax error, unexpected 'name' (T_STRING) in   /home/adelanmu/public_html/user-class.php on line 54

public function lista(){
   $pdo = Conexao::conexao();
   $sql  = 'SELECT * FROM usuario WHERE id_cliente = ' . 
   $_SESSION['id_cliente'];';
   $consulta = $pdo->query($sql);
   $dados = null;
   while ($linha = $consulta->fetch(PDO::FETCH_ASSOC)){
       $dados[] = array(
         "nome" => $linha['nome'],
         "email" => $linha['email'],        
         "senha" => $linha['senha']          
       );     
   }
   $pdo = null;
   return $dados;
}
    
asked by anonymous 21.09.2018 / 18:52

0 answers