PHP Manual: json_encode
json_encode
(no version information, might be only in CVS)
json_encode -- Returns the JSON representation of a valueDescription
string json_encode ( mixed value )
Returns a string containing the JSON representation of
value.
Parameters
valueThe
valuebeing encoded. Can be any type except a resource.This function only works with UTF-8 encoded data.