$Data = Array
(
[2003-10-09] => 655.00,
[2003-10-08] => 490.00,
[2003-10-07] => 225.00,
[2003-10-06] => 525.00,
[2003-10-05] => 500.00,
[2003-10-04] => 375.00,
[2003-10-03] => 565.00,
[2003-10-02] => 670.00,
[2003-10-01] => 250.00,
[2003-09-30] => 230.00,
);
^^^^^^^^ this is wrong..... you will get an error as you've already seen..... to define an array you MUST have a comma dlimited list of VALUES (for numerically indexed arrays ie $var[1] = 'foo'😉 OR a comma delimited list of "quoted key names" => value (for KEYED arrays, ie $var['thiskey'] = 'thisvalue'😉
now....
print_r() will show you the ARRAY() function stored in that variable.... so you will see
$myarray = array(
'keyname' => value1,
'keyname2' => value2,
);
however, to ACCESS the data in this array you MUST use []'s
echo $myarray['keyname']; //outputs value1
echo $myarray['keyname2']; //outputs value2
now do you understand arrays a bit more?
you ARE getting the array you want... you just arent understanding how to access the data there....
but if I replace the [] with " " it works just fine
$Data = Array
(
"2003-10-09" => 655.00,
"2003-10-08" => 490.00,
"2003-10-07" => 225.00,
"2003-10-06" => 525.00,
"2003-10-05" => 500.00,
"2003-10-04" => 375.00,
"2003-10-03" => 565.00,
"2003-10-02" => 670.00,
"2003-10-01" => 250.00,
"2003-09-30" => 230.00,
);
any idea why? thanks for your help! [/B][/QUOTE]