Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/227.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/arrays/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
从PHP数组中获取用于Google图表的值作为列表_Php_Arrays_Google Visualization - Fatal编程技术网

从PHP数组中获取用于Google图表的值作为列表

从PHP数组中获取用于Google图表的值作为列表,php,arrays,google-visualization,Php,Arrays,Google Visualization,我对PHP非常陌生,我正在尝试使用googlechartphplib api要求以以下形式输入数据: $data = new GoogleChartData(array(3450,800,700,5,50,67,1000,1250,900)); 长话短说,我有一个PHP数组,在使用时: echo '<pre>' . print_r($usersteps, true) . '</pre>'; 我不确定的是得到一个似乎与GoogleChartData一起工作的列表值;有什

我对PHP非常陌生,我正在尝试使用googlechartphplib

api要求以以下形式输入数据:

$data = new GoogleChartData(array(3450,800,700,5,50,67,1000,1250,900));
长话短说,我有一个PHP数组,在使用时:

echo '<pre>' . print_r($usersteps, true) . '</pre>';
我不确定的是得到一个似乎与GoogleChartData一起工作的列表值;有什么想法吗

我尝试了infrade(),格式看起来正确,但结果是一个字符串,似乎不起作用

array\u值($usersteps)
只返回
array

我确信这是直截了当的,但我不确定使用哪个函数来获取阵列数据以与GoogleChartData一起工作。

为什么不使用:


GoogleChartData需要一个数组,你有一个:)

就可以了!谢谢我被困在圆圈里,试图格式化一个已经存在的数组。
Array
    (
        [0] => 3450
        [1] => 800
        [2] => 700
        [3] => 5
        [4] => 50
        [5] => 67
        [6] => 1000
        [7] => 1250
        [8] => 900
     )
$data = new GoogleChartData($usersteps);