phpeveryday.com

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


PHP WDDX: Understanding Simple Data Type

Tag: wddx, distributed data, data type, elements, simple data type   Category: PHP Application
post: 29 Apr 2008 read: 247


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:

Null

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


<null/>

boolean

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


<boolean>true</boolean>

number

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


<number>12345</number>
<number>-12345</number>
<number>12.345</number>
<number>-12.345</number>
<number>123456789012345</number>

dateTime

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


<dateTime>2008-06-25T15:20:04-04:00</dateTime>

string

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

| 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