wddx_add_vars

bool wddx_add_vars(int packetID, mixed var1, [mixed var2,...]) 
packetID Packet ID
var1 , var2 Names of variables to add

Adds one or more variables to a WDDX packet.

Returns:

TRUE on success; FALSE on error

Description:

This function adds one or more variables to the packet identified with argument 1, the packet ID. Note that you pass the variable name (such as "foo"), not the variable itself (such as $foo).

You can supply multiple variables to be added in one step. Regardless of the number of variables, PHP creates a WDDX STRUCT packet. This functions the same way as wddx_serialize_vars().

Version:

Existing since versions 3.0.7 and 4.0

Example:

Create a WDDX packet
 /* OUTPUT <wddxPacket version='1.0'> <header/> <data> <struct> ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.