need help on gchart |
[eluser]Nano HE[/eluser]
Hi, I followed the wiki artichle (http://codeigniter.com/wiki/gchart/revision/5312/) to practice google chart in my CI 2.0. But it doesn't work. controller file: ci\application\helpers\mytest.php Code: $this->load->helper( 'gchart' ); view file: ci\application\helpers\my_test.php Code: <?php help file: ci\application\helpers\gchart_helper.php Code: // I do copied all the source code from the wiki url link above. When I try to charted by CI. It showed error as this, Parse error: syntax error, unexpected ';' in C:\xampp\htdocs\demo\ci\application\views\my_test.php on line 54 Any thing wrong on my operation? I compared the extendedencode() from gchart_helper.php Code: function extendedencode($data, &$maxvalue='notspecified') Code: $encoded_data = extendedencode(array(0, 1, 2, 3, 4, 5, 6) &maxvalue;); Then I updated the extendedencode() line to this in my_test.php view file, Code: $encoded_data = extendedencode(array(0, 1, 2, 3, 4, 5, 6), &maxvalue;); And try again, but still get this error below. Parse error: syntax error, unexpected ')', expecting T_PAAMAYIM_NEKUDOTAYIM in C:\xampp\htdocs\demo\ci\application\views\my_test.php on line 54 Any help and comments are great appreciated. |
Welcome Guest, Not a member yet? Register Sign In |