PHP WDDX: Understanding Simple Data Type

Web Distributed Data Exchange Step By Step tutorial - Part 4: Simple data type contains only particular data type. It can not contains additional data type. These elements include null, boolean, number, datetime, and string. How do we use them? look this:


The null element represents a NULL value or empty string. This is the element's syntax:



The boolean element represents a Boolean value. The value of this element: true or false. This is case sensitive, so, use lowercase.



The number element contain the serialized value for the number 12345, -12345, 12.345, -12.345, and 123456789012345:



The dateTime element carries date and time information in ISO 8601 format. Although PHP doesn't have a native datetime type, we can use date() function with the c format parameter: date('c'). Another alternative is add DATE_ISO8601 constant in PHP 5.1



The string element contains arbitrary length string that must not contain embedded NULLs.

<string>It is easy to learn php with phpeveryday</string>

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

Bookmark and Share Tag: wddx, distributed data, data type, elements, simple data type Category: PHP Application Post : April 29th 2008 Read: 22,905


blog comments powered by Disqus