PHPackages                             amnl/gc-datatable - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. amnl/gc-datatable

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

amnl/gc-datatable
=================

PHP library to generate JSON data for Google Chart Tools.

v0.2.0(13y ago)329.4k↓29.2%MITPHPPHP &gt;=5.3.0

Since Oct 28Pushed 12y ago1 watchersCompare

[ Source](https://github.com/itavero/AMNL-GCDataTable)[ Packagist](https://packagist.org/packages/amnl/gc-datatable)[ Docs](https://github.com/itavero/AMNL-GCDataTable)[ RSS](/packages/amnl-gc-datatable/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (3)Used By (0)

GC DataTable
============

[](#gc-datatable)

[![Build Status](https://camo.githubusercontent.com/22d0560a1941bf2be7621c6699ec2e0a40f035700fd1a4316c3713145397bdb1/68747470733a2f2f7472617669732d63692e6f72672f6974617665726f2f414d4e4c2d4743446174615461626c652e706e67)](https://travis-ci.org/itavero/AMNL-GCDataTable)[![Latest Stable Version](https://camo.githubusercontent.com/f754fd8ea654a16fbd3e065aa08d42b4c2c640c380458f03239a9462447ea347/68747470733a2f2f706f7365722e707567782e6f72672f616d6e6c2f67632d646174617461626c652f762f737461626c652e706e67)](https://packagist.org/packages/amnl/gc-datatable)[![Total Downloads](https://camo.githubusercontent.com/c8b1b952a8a0f241fbef43c2b07c6da07fe31881174cf14d66a1f6a734db53ec/68747470733a2f2f706f7365722e707567782e6f72672f616d6e6c2f67632d646174617461626c652f646f776e6c6f6164732e706e67)](https://packagist.org/packages/amnl/gc-datatable)

This library is meant to simplify the dynamic generation of a JSON-representation of a DataTable when using PHP. DataTables are used by the Google Visualization API / Chart Tools, see [this reference on developers.google.com](https://developers.google.com/chart/interactive/docs/reference#dataparam) for more info.

Problems? Suggestions?
----------------------

[](#problems-suggestions)

Create a new issue to tell me about your suggestions and/or problems. I'd love to hear your opinion!

Example
-------

[](#example)

For the time being you can have a look at ["Populating Data Using Server Side Code"](https://developers.google.com/chart/interactive/docs/php_example). The code below basically replaces getData.php and sampleData.json and allows you to dynamically change the output.

```
