Here is my code:
$adjacencies = array ( "0" => array( "name1" => "pear",
"name2" => "jack",
"data" => array() ),
"1" => array( "name1" => "pear",
"name2" => "john",
"data" => array() )
);
$final_array['adjacencies'] = $adjacencies;
echo "<pre>";
print_r(json_encode($final_array));
And this is the result of code above:
As you see data's value is [], while I want this {} instead. How can I do that?
