
Frenzyy
-
Posts
6 -
Joined
-
Last visited
Community Answers
-
Frenzyy's post in Google Charts Dynamic Arrays PHP Without SQL was marked as the answer
array_combine was needed to join the two arrays together and then inside of 'function drawChart' a simple foreach loop was required, like this:
<?php
foreach ($array as $name => $allocation):
echo "['$name', $allocation]";
echo ($allocation != end($array)) ? ',' : '';
endforeach;
?>