PHP WDDX: Struct Element
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>

