Function __global->table_to_json

Definitions

sources/resource_fs.php

  • Transfer a table's contents to JSON format.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: string

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$table string No No required parameter N/A N/A Table name
$fields_to_skip array No No [] N/A N/A Fields to not include in the table dump. Any keys from $where_map will also be skipped, as these are obviously constant for all rows returned.
$where_map array No No [] N/A N/A Extra WHERE constraints

Returns

  • JSON data
  • Type: string
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Transfer a table's contents to JSON format.
 *
 * @param  string $table Table name
 * @param  array $fields_to_skip Fields to not include in the table dump. Any keys from $where_map will also be skipped, as these are obviously constant for all rows returned.
 * @param  array $where_map Extra WHERE constraints
 * @return string JSON data
 */

function table_to_json(string $table, array $fields_to_skip = [], array $where_map = []) : string