phpeveryday.com

The best tutorial of php, php framework, php strategies, object oriented oriented,


PHP WDDX: Struct Element

Tag: wddx, distributed data, data type, elements, struct, array   Category:
post: 29 Apr 2008 read: 238


Web Distributed Data Exchange Step By Step tutorial - Part 6: in WDDX scope, it is like array but only for string-based indexes (if numeric-based, we use array element). Hope, it is simple to understand. Look following sample:

If we want to write:


$students = array('stud1'=>'Ilmia','stud2'=>'Aqila','stud3'=>'Imanda');

We can write:


<wddxPacket version='1.0'>
  <header />
  <data>
    <var name="students">
      <struct>
	    <var name="stud1">
	      <string>Ilmia</string>
	    </var>
	    <var name="stud2">
	      <string>Aqila</string>
	    </var>
	    <var name="stud3">
	      <string>Imanda</string>
	    </var>	  
      </struct>
	</var>
  </data>
</wddxPacket>


Series this article:
PHP WDDX: Introduction
PHP WDDX: Understanding Anatomy of WDDX
PHP WDDX: Understanding Data Elements
PHP WDDX: Understanding Simple Data Type
PHP WDDX: Using Array Elements
PHP WDDX: Struct Element
PHP WDDX: Recordset Element
PHP WDDX: Simple Serialization Using PHP function
PHP WDDX: Complex Serialization
PHP WDDX: Unserializing Data
PHP WDDX: Creating Web Service Server
PHP WDDX: Creating Web Service Client

| Give Your Opinion | Recommend
Share and Bookmark to: These icons link to social bookmarking sites where readers can share and discover new web pages.
digg del.icio.us technorati Ma.gnolia BlinkList

Recommended articles by other readers:
Web Services: How PHP Kiss VB.NET? (Part 1)
Chart: How to Build Cool Animation Real Time Chart
Joomla: Fast Road to Understand Component Programming
Email: Send Attachement Mail
mod_rewrite - Part 1: create your "fantasy" URL

What do You Think?
Your Name *:
Email *:
(Will not be published)
Website/URL:
Your Comment *:
* Required


615
posting