I've the following PHP array (key value pair multi dimensional array)
$myarr = array (
'one' => array ('1one','2one','3one'),
'two',
'three',
'four' => array ('1four','2four'),
'five'
);
How to writ exact array using JAVASCRIPT ?
I'm not good in javascript but this is my failure try, i do not know if javascript support such type of arrays or not!
var myarr = [
{ 'one' : ['1one','2one','3one']},
{'two'},
{'three'},
{'four' : ['1four','2four']},
{'five'}
];
echo json_encode($myarr);