Function __global->table_from_json
Definitions
sources/resource_fs.php
- Transfer JSON format to a table.
- Visibility: public
- Is abstract?: No
- Is static?: No
- Is final?: No
- Returns: bool
Parameters
| Name | Type | Passed by reference? | Variadic? | Default | Set | Range | Description |
|---|---|---|---|---|---|---|---|
| $table | string | No | No | required parameter | N/A | N/A | Table name |
| $json | mixed | No | No | required parameter | N/A | N/A | JSON data OR rows that are already decoded |
| $extra_field_data | array | No | No | required parameter | N/A | N/A | Extra data to add to each row |
| $replace_mode | integer | No | No | required parameter | N/A | N/A | Whether to fully replace the current table contents |
Returns
- Success status
- Type: boolean
- Set: N/A
- Range: N/A
Preview
Code (PHP)
/**
* Transfer JSON format to a table.
*
* @param string $table Table name
* @param mixed $json JSON data OR rows that are already decoded
* @param array $extra_field_data Extra data to add to each row
* @param integer $replace_mode Whether to fully replace the current table contents
* @return boolean Success status
*/
function table_from_json(string $table, $json, array $extra_field_data, int $replace_mode) : bool
* Transfer JSON format to a table.
*
* @param string $table Table name
* @param mixed $json JSON data OR rows that are already decoded
* @param array $extra_field_data Extra data to add to each row
* @param integer $replace_mode Whether to fully replace the current table contents
* @return boolean Success status
*/
function table_from_json(string $table, $json, array $extra_field_data, int $replace_mode) : bool

