Modifier l'affichage de Var_dump

Fermé
TheBleedz - 12 août 2013 à 12:07
ThEBiShOp Messages postés 8378 Date d'inscription jeudi 22 mars 2007 Statut Contributeur Dernière intervention 8 février 2021 - 12 août 2013 à 12:09
Bonjour,

Je ne sais pas si cela est possible car je n'ai rien trouvé sur interne ou alors j'ai du mal chercher. J'aimerais savoir comment faire pour modifier l'affichage après un var_dump ? Pour faire en sorte qu'au lieu d'afficher comme ci-dessous :

array (size=6)
  0 => 
    object(stdClass)[21]
      public 'membres_id' => string '34' (length=2)
      public 'membres_id_add' => string '0' (length=1)
      public 'publi_text' => string 'Bonjour' (length=7)
      public 'publi_date' => string '2013-08-06 02:10:44' (length=19)
      public 'publi_watch' => string '0' (length=1)
  1 => 
    object(stdClass)[22]
      public 'membres_id' => string '34' (length=2)
      public 'membres_id_add' => string '0' (length=1)
      public 'publi_text' => string 'Bonjour' (length=7)
      public 'publi_date' => string '2013-08-06 14:16:55' (length=19)
      public 'publi_watch' => string '0' (length=1)
  2 => 
    object(stdClass)[23]
      public 'membres_id' => string '34' (length=2)
      public 'membres_id_add' => string '34' (length=2)
      public 'publi_text' => string 'Salutation à tous !' (length=20)
      public 'publi_date' => string '2013-08-08 12:49:34' (length=19)
      public 'publi_watch' => string '0' (length=1)
  3 => 
    object(stdClass)[24]
      public 'membres_id' => string '34' (length=2)
      public 'membres_id_add' => string '34' (length=2)
      public 'publi_text' => string 'test2' (length=5)
      public 'publi_date' => string '2013-08-08 14:33:05' (length=19)
      public 'publi_watch' => string '0' (length=1)
  4 => 
    object(stdClass)[25]
      public 'membres_id' => string '36' (length=2)
      public 'membres_id_add' => string '36' (length=2)
      public 'publi_text' => string 'test3' (length=5)
      public 'publi_date' => string '2013-08-08 17:42:20' (length=19)
      public 'publi_watch' => string '0' (length=1)
  5 => 
    object(stdClass)[26]
      public 'membres_id' => string '34' (length=2)
      public 'membres_id_add' => string '34' (length=2)
      public 'publi_text' => string 'test Internet Explorer' (length=24)
      public 'publi_date' => string '2013-08-08 17:44:55' (length=19)
      public 'publi_watch' => string '0' (length=1)


Il m'affiche proprement avec une mise en forme en HTML.
Comme par exemple :

Bonjour (2013-08-06 02:10:44) Vous êtes le numéro : 34
Bonjour (2013-08-06 14:16:55) Vous êtes le numéro : 34
Salutation à tous ! (2013-08-08 12:49:34) Vous êtes le numéro : 34
etc...



Merci à tous et bonne journée à vous.



A voir également:

1 réponse

ThEBiShOp Messages postés 8378 Date d'inscription jeudi 22 mars 2007 Statut Contributeur Dernière intervention 8 février 2021 1 566
12 août 2013 à 12:09
Salut,

tu ne peux pas modifier var_dump, par contre tu peux faire une fonction qui va parcourir ton tableau et afficher tes infos comme tu le souhaites.
0