
Randy Ahn - 2006-10-20 17:41:40
Hello:
I'm not sure if I'm using the class correctly, but I just tried to convert a results array into js using this class, using the easiest example in example.php Thanks.
My code:
$result = mysql_query($sql) or die(mysql_error());
$easyconvert = new array_to_js();
$easyconvert->add_array($result, "myarray");
echo $easyconvert->output_all();
And the error:
Warning: Invalid argument supplied for foreach() in /home/username/public_html/myPath/class_arraytojs.php on line 13