#native_company# #native_desc#
#native_cta#

WDDX Functions in PHP Page 4

By Jess M. Castagnetto
on July 30, 2000

The serialized packet will be (manually formatted for clarity):

  <wddxPacket version='0.9'>

  <header/>

  <data>

    <struct>

      <var name='name'>

    <string>John Q. Public</string>

      </var>

      <var name='info'>

    <struct>

      <var name='email'>

        <string>[email protected]</string>

      </var>

      <var name='address'>

        <string>234 West 4th St. Apt 543</string>

      </var>

      <var name='city'>

        <string>New York City</string>

      </var>

      <var name='state'>

        <string>NY</string>

      </var>

      <var name='zip'>

        <string>10003</string>

      </var>

    </struct>

      </var>

      <var name='products'>

    <array length='2'>

      <string>56Kbps modem X-9</string>

      <string>Thunder 11 graphic card</string>

    </array>

      </var>

    </struct>

  </data>

</wddxPacket>


wddx_add_vars
Used to add one or more variables to a packet created using
wddx_packet_start, and requires the packet identifier returned by that
function. This function is used to incrementally add to an existing packet.
See the listing for wddx_generator.php3 below for an example on the usage of
this function.

wddx_deserialize
Deserializes the incoming packet, returning a variable of mixed type. You
should always test the type of the variable created by calling this function.
In general if the WDDX packet contained more than one variable, an associative
array will be returned in which the array keys will be the name of the
serialized variables. See the listing for wddx_consumer.php3 below for an
example on the usage of this function.

1
|
2
|
3
|
4
|
5
|
6
|
7
|
8