return array of php objects [closed]

-1

Hi, I have a function in php that returns an array of objects but when doing a var_dump it shows me this:

object(ArrayObject)#8 (1) { ["storage":"ArrayObject":private]=> array(0) { } } 

 $conductor=new Conductor($fila['dni'],
                                             $fila['nombre'],
                                             $fila['telefono'],
                                             $fila['capMercancias'],
                                             $fila['fechaMercancias'],
                                             $fila['capViajeros'],
                                             $fila['fechaViajeros'],
                                             $fila['adr'],
                                             $fila['fechaAdr'],
                                             $fila['tacografo'],
                                             $fila['fechaTacografo'],
                                             $fila['token'],
                                             $fila['notificado'],
                                             $fila['avisado']
                                             );
                                    $conductor->setNotificado($valor);
                                    $usuariosNotificados->append($conductor

$ UsersNotified is the array

    
asked by aitorlv 08.02.2018 в 21:55
source

2 answers

0

Maybe you can try this with foreach:

foreach ($usuariosNotificados as $usuarios) {
  echo $usuarios->id . " " . $usuarios->valor; }
    
answered by 08.02.2018 / 23:09
source
0

Does not it print to you in your sight?

echo $conductor['nombre'];

to print on a table if it is a list of columns

<?php


foreach($perfiles as $perfil){
                    ?>
                    <tr>
                      <td><?php echo $perfil['experiencia'] ?></td>
                    </tr>
                    <?php
                    }
                    ?>
    
answered by 08.02.2018 в 23:10