I am trying to pass a multidimensional array like this:
Code:
Array
(
    [Alabama] => Array
        (
            [corp] => 90
            [llc] => 75
        )
)
to JS so that I can use the data in a JS function. I tried this script:
PHP Code:
<?php
include('state_list.php');
foreach (
$state_costs as $foo => $bar) {
    foreach (
$bar as $key => $val) {
echo 
"    array['{$foo}']['{$key}'] = '{$val}';\n";
    }
}
?>
which has output that looks like this:
Code:
array['Alabama']['corp'] = '90';
array['Alabama']['llc'] = '75';
However, this doesn't work. Does JS even support this? If so, how would I do it?