i've been trying to make this array
$data = array (
'country' => '+57',
'message' => 'test',
'messageFormat' => 0,
'addresseeList' =>
array (
0 =>
array (
'mobile' => '1111',
'correlationLabel' => 'corelation ejemplo',
),
)
);
into this
$data = array();
$data['country'] = '+57';
$data['message'] = 'test';
$data['messageFormat'] = 0;
$data['addresseeList'] = array(
$data['mobile'] = '1111',
$data['correlationLabel'] = 'corelation ejemplo'
);
But when i try to convert this array into a json object i'm getting this
string(154) "{"country":"+57","message":"test","messageFormat":0,"mobile":"1111","correlationLabel":"corelation ejemplo","addresseeList":["1111","corelation ejemplo"]}"
but i should get something like this
string(128) "{"country":"+57","message":"test","messageFormat":0,"addresseeList":[{"mobile":"1111","correlationLabel":"corelation ejemplo"}]}"
Thanks in advance