Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

This question already has an answer here:

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.

share|improve this question

marked as duplicate by Sebastian Bochan, Maerlyn, diosney, Kedarnath, BetaRide Jul 4 at 13:08

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2  
use json_encode($array); before sending it to javascript. –  iamde_coder Jul 3 at 15:14
    
@iamde_coder can u please post as answer –  Nisham Mahsin Jul 3 at 15:14
    

1 Answer 1

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

share|improve this answer
    
can you please elaborate to how to use this json in highcharts.ie; dates in xaxis and total_booking in yaxis –  Nisham Mahsin Jul 3 at 17:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.