I want to assign an array as an value of another variable in PHP. First array is
<?php
$jsonData = array(
'EndUserIp' => $ipAddress,
'TokenId' => 'a58c1052-c08f-4f40-9a9c-8841de585a14',
'AdultCount' => 1,
'ChildCount' => 0,
'InfantCount' => 0,
'DirectFlight' => 1,
'OneStopFlight' => 0,
'JourneyType' => 1,
'Segments'
);
?>
The second array is:
<?php
$segmentVal = array(
'Origin' => 'DEL',
'Destination' => 'CCU',
'FlightCabinClass' => 2,
'PreferredDepartureTime' => '2017-10-13T00:00:00',
'PreferredArrivalTime' => '2017-10-13T00:00:00'
);
?>
I want to assign the second array as the value of Segment variable in the first array.