7.108 WDDX
7 Index des fonctions
Manuel PHP
. Introduction . Pré-requis . Installation . Configuration à l'exécution . Types de ressources . Constantes prédefinies . Exemples . wddx_add_vars . wddx_deserialize . wddx_packet_end . wddx_packet_start . wddx_serialize_value ->wddx_serialize_vars
|
7.108.13 wddx_serialize_vars()Enregistrer plusieurs valeurs dans un paquet WDDX[ Exemples avec wddx_serialize_vars ] PHP 3>= 3.0.7, PHP 4
string
wddx_serialize_vars (
mixed
var_name
,
mixed
...
)
wddx_serialize_vars
sert à créer un
paquet WDDX avec une structure qui contient la représentation des
variables passées en arguments.
wddx_serialize_vars
prend un nombre variable d'arguments,
chacun d'entre eux pouvant être une chaîne contenant le nom d'une
variable, ou un tableau de chaîne de nom de variable, ou même
d'autres tableaux.
wddx_serialize_vars |
<?php $a = 1; $b = 5.5; $c = array("bleu", "orange", "violet"); $d = "colors"; $clvars = array("c", "d"); print wddx_serialize_vars("a", "b", $clvars); ?>
|
L'exemple ci-dessus donnera :
<wddxPacket version='1.0'><header/><data><struct><var name='a'><number>1</number></var>
<var name='b'><number>5.5</number></var><var name='c'><array length='3'>
<string>bleu</string><string>orange</string><string>violet</string></array>
</var><var name='d'><string>colors</string></var></struct></data></wddxPacket>
|