I have a mysql table that has data in it that I need to use in a more basic format.
There is ID number, Date, oil, gas and electric values.
I can do a mysql_fetch_array which brings back all the values I need but I need to view them in a format for use with a javascript chart. They need to be in the format:
$data = array(array("6/22/2009",425.32),array("6/8/2009",424.84),array("5/26/2009",417.23),array("5/11/2009",390));
As you can see I need the date and the oil values. Then I need to create another array with the date and electric values and finally the data and the gas values.
I'm not sure how to get the data from the mysql_fetch_array and add it to the array as shown above. Can anyone help?