Data from PHP array

47 views
Skip to first unread message

Phil I

unread,
Jul 26, 2016, 9:01:40 AM7/26/16
to Google Visualization API
Hi, I need to construct a simple bar chart using two arrays generated by a PHP/MySQL query.
$aty represents values
$atx represents the column labels

Alternatively:
$datay=(str_getcsv($aty));
$datax=(str_getcsv($atx));

Could someone please help with the correct syntax/script?
Many thanks

Phil I

unread,
Jul 28, 2016, 8:02:23 AM7/28/16
to Google Visualization API

EDIT:
The full array is also stored in a text (.txt) file. How would we extract that to a DataTable in the script?
Thanks

Sukhjeet Singh

unread,
May 24, 2017, 10:56:48 AM5/24/17
to Google Visualization API
Array
(
    [48-sheets HD] => Array
        (
            [2016] => 39877
            [2017] => 555648
        )

    [6-Sheets] => Array
        (
            [2017] => 473453
        )

)

i want o add the 2016 value as 0 in 6-Sheets
Reply all
Reply to author
Forward
0 new messages