1

I have a 2 dimensional array in php

Array ( [0] => Array ( [date] => 16/06/2014 [total_booking] => 2 ) [1] => Array ( [date] => 16/06/2014 [total_booking] => 1 ) [2] => Array ( [date] => 16/06/2014 [total_booking] => 1 ) [3] => Array ( [date] => 17/06/2014 [total_booking] => 1 ) [4] => Array ( [date] => 18/06/2014 [total_booking] => 1 ) [5] => Array ( [date] => 18/06/2014 [total_booking] => 1 ) ) 

i want to use this array in highcharts as date in x-axis and total booking in y charts, how to convert this array into javascript array.please help.

3

1 Answer 1

1

use json_encode($array); before sending it to javascript.

1
  • can you please elaborate to how to use this json in highcharts.ie; dates in xaxis and total_booking in yaxis Commented Jul 3, 2014 at 17:19

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.