Renseigner une variable avec le contenu d'un array.

Répondre


Cette question est un moyen d’empêcher des soumissions automatisées de formulaires par des robots.
Smileys
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: =D> #-o =P~ :^o :non: :priere: 8-|
Voir plus de smileys
  Revue du sujet
 

  Étendre la vue Revue du sujet : Renseigner une variable avec le contenu d'un array.

Re: Renseigner une variable avec le contenu d'un array.

par wisefun77 » 01 sept. 2022, 16:59

Je pense que c'est implode()
Je vais tester.

Renseigner une variable avec le contenu d'un array.

par wisefun77 » 01 sept. 2022, 16:12

Bonjour,
J'aimerai que le contenu du tableau puis être intégré dans une variable.
J'ai fait ceci mais pas terrible.

Code : Tout sélectionner

$_SESSION['ValueInter']= print_r($_SESSION['TabInter']).print_r($_SESSION['TabMat']).print_r($_SESSION['TabLog']);

cela affiche

Code : Tout sélectionner

Array ( [0] => [DEM_PDT_PCF < AE_aaa>< TPX_1>] [1] => [PRT_PCF < AE_bbb>< TPX_2>] ) Array ( [0] => [PRT_PRP < AE_ ccccc < TPX_3>] [1] => [PRT_PRP < AE_ dddddd < TPX_4>] ) Array ( [0] => [SFW_TLD< AS_eeeee > < TPX_5 > ] [1] => [SFW_LOC< AS_fffff > < TPX_6 > ] )

j'aimerais en fait que cela affiche ainsi.

Code : Tout sélectionner

[DEM_PDT_PCF < AE_aaa>< TPX_1>] [PRT_PCF < AE_bbb>< TPX_2>] [PRT_PRP < AE_ ccccc < TPX_3>] [PRT_PRP < AE_ dddddd < TPX_4>] [SFW_TLD< AS_eeeee > < TPX_5 > ] [SFW_LOC< AS_fffff > < TPX_6 > ]
Merci