While writeOutput writes to the page-output stream, this function writes to the main response buffer
echo(string)
returns boolean
Name | Type | Required | Default | Description |
---|---|---|---|---|
string | string | Yes | String to be written to the output buffer |
Prints a simple string.
echo("hello world");
Note that complex objects will not automatically be converted to String, as with System.out.println in Java.
// Create data
data = {
"title" : "A Game of Thrones",
"author" : "George R. R. Martin",
"ISBN" : "0-00-224584-1"
};
// Print data
echo(data.toString());